/* Kogi Box - Portal Wi-Fi
   Todo el CSS es local: el portal debe verse bien ANTES de tener internet. */

:root {
  --rojo: #c00b2d;
  --rojo-osc: #a00a26;
  --azul: #046bd2;
  --negro: #0a0a0a;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
               'Helvetica Neue', Arial, sans-serif;
  background: linear-gradient(135deg, #0a0a0a 0%, #1a0a10 50%, #0a0a0a 100%);
  color: #fff;
  -webkit-font-smoothing: antialiased;
  min-height: 100%;
}

/* Fondo de comida local (se sirve desde el propio portal, carga sin internet) */
body:not(.admin) .pantalla::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  background-image:
    linear-gradient(180deg, rgba(10,10,10,.82) 0%, rgba(10,10,10,.74) 45%, rgba(192,11,45,.72) 100%),
    url('comida.jpg');
  background-size: cover;
  background-position: center;
  pointer-events: none;
}

.pantalla {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
  position: relative;
  overflow: hidden;
}

.pantalla--splash::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 15%, rgba(192, 11, 45, .45), transparent 55%),
    radial-gradient(circle at 85% 80%, rgba(4, 107, 210, .30), transparent 55%);
  pointer-events: none;
}

.caja {
  width: 100%;
  max-width: 420px;
  position: relative;
  z-index: 1;
}

.centrado { text-align: center; }

/* ---------- Marca ---------- */
.logo {
  font-size: 44px;
  font-weight: 900;
  letter-spacing: -1px;
  line-height: 1.05;
}
.logo span { color: var(--rojo); }

.slogan {
  margin-top: 6px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .04em;
  color: rgba(255, 255, 255, .7);
}

h2.titulo {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 8px;
}

.subtitulo {
  font-size: 15px;
  line-height: 1.6;
  color: rgba(255, 255, 255, .8);
}

/* ---------- Beneficios ---------- */
.beneficios { margin: 32px 0; display: grid; gap: 12px; }

.beneficio {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 14px;
  padding: 12px 16px;
  text-align: left;
}

.beneficio .icono {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: var(--rojo);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
}

.beneficio span { font-size: 14px; font-weight: 500; }

/* ---------- Botones ---------- */
.boton {
  display: block;
  width: 100%;
  border: 0;
  cursor: pointer;
  background: var(--rojo);
  color: #fff;
  font-family: inherit;
  font-size: 17px;
  font-weight: 700;
  padding: 16px 24px;
  border-radius: 16px;
  text-align: center;
  text-decoration: none;
  box-shadow: 0 10px 30px rgba(192, 11, 45, .35);
  transition: background .18s ease, transform .12s ease;
}
.boton:hover  { background: var(--rojo-osc); }
.boton:active { transform: scale(.98); }
.boton[disabled] { opacity: .65; cursor: not-allowed; }

.boton--secundario {
  background: rgba(255, 255, 255, .1);
  box-shadow: none;
  font-size: 15px;
  padding: 12px 20px;
}
.boton--secundario:hover { background: rgba(255, 255, 255, .18); }

/* ---------- Formulario ---------- */
.tarjeta {
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 22px;
  padding: 26px 22px;
  backdrop-filter: blur(6px);
}

.campo { margin-bottom: 16px; }

.campo label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
  color: rgba(255, 255, 255, .85);
}

.campo input {
  width: 100%;
  font-family: inherit;
  font-size: 16px; /* 16px evita el zoom automático en iOS */
  color: #fff;
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 12px;
  padding: 13px 14px;
  outline: none;
  transition: border-color .16s ease, background .16s ease;
}

.campo input::placeholder { color: rgba(255, 255, 255, .35); }

.campo input:focus {
  border-color: var(--rojo);
  background: rgba(255, 255, 255, .1);
}

.fila { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

@media (max-width: 380px) {
  .fila { grid-template-columns: 1fr; }
}

.terminos {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 18px 0 22px;
  font-size: 13px;
  line-height: 1.5;
  color: rgba(255, 255, 255, .75);
}

.terminos input {
  margin-top: 2px;
  width: 17px;
  height: 17px;
  accent-color: var(--rojo);
  flex-shrink: 0;
}

.aviso {
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 14px;
  margin-bottom: 18px;
}
.aviso--error { background: rgba(192, 11, 45, .18); border: 1px solid rgba(192, 11, 45, .5); }
.aviso--ok    { background: rgba(34, 197, 94, .15); border: 1px solid rgba(34, 197, 94, .45); }

/* ---------- Bienvenida ---------- */
.palomita {
  width: 84px;
  height: 84px;
  margin: 0 auto 22px;
  border-radius: 999px;
  background: rgba(34, 197, 94, .18);
  border: 2px solid rgba(34, 197, 94, .6);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  animation: aparecer .5s ease;
}

@keyframes aparecer {
  from { transform: scale(0) rotate(-140deg); opacity: 0; }
  to   { transform: scale(1) rotate(0);       opacity: 1; }
}

/* ---------- Pie ---------- */
.pie {
  margin-top: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  font-size: 12px;
  color: rgba(255, 255, 255, .55);
}
.pie a { color: inherit; text-decoration: none; }
.pie a:hover { color: rgba(255, 255, 255, .9); }

.volver {
  display: inline-block;
  margin-bottom: 14px;
  font-size: 13px;
  color: rgba(255, 255, 255, .6);
  text-decoration: none;
}
.volver:hover { color: #fff; }

/* ---------- Panel admin ---------- */
.admin { background: #f6f7f9; color: #111; min-height: 100vh; }
.admin-barra {
  background: var(--negro);
  color: #fff;
  padding: 16px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.admin-barra .logo { font-size: 22px; }
.admin-cuerpo { padding: 24px 22px 60px; max-width: 1150px; margin: 0 auto; }

.metricas {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.metrica {
  background: #fff;
  border-radius: 14px;
  padding: 18px 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .08);
}
.metrica .n { font-size: 30px; font-weight: 800; color: var(--rojo); }
.metrica .t { font-size: 13px; color: #666; margin-top: 2px; }

.tabla-caja {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .08);
  overflow-x: auto;
}

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th {
  text-align: left;
  padding: 13px 16px;
  background: #fafafa;
  border-bottom: 1px solid #eee;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: #777;
  white-space: nowrap;
}
td { padding: 13px 16px; border-bottom: 1px solid #f2f2f2; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }

.etiqueta {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
}
.etiqueta--ok { background: #dcfce7; color: #166534; }
.etiqueta--no { background: #fee2e2; color: #991b1b; }

.acciones { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 20px; }

.boton-chico {
  display: inline-block;
  border: 0;
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: 10px;
  text-decoration: none;
  background: var(--rojo);
  color: #fff;
}
.boton-chico:hover { background: var(--rojo-osc); }
.boton-chico--gris { background: #e5e7eb; color: #333; }
.boton-chico--gris:hover { background: #d5d7db; }

.admin .campo label { color: #333; }
.admin .campo input {
  background: #fff;
  border: 1px solid #ddd;
  color: #111;
}
.admin .campo input::placeholder { color: #aaa; }
