/* Panel de Comanda Más Menú. Primero celular; el escritorio es una ampliación. */
:root {
  --fondo: #f4f3ef;
  --superficie: #ffffff;
  --texto: #1c1b19;
  --suave: #6b6a66;
  --borde: #e2e0d9;
  --marca: #0E0E0D;
  --acento: #FFC629;
  --acento-texto: #8A6000;
  --error: #b42318;
  --error-fondo: #fdecea;
  --ok: #146c43;
  --ok-fondo: #e6f4ec;
  --info-fondo: #fff7d6;
  --radio: 14px;
  --sombra: 0 1px 2px rgb(0 0 0 / .05), 0 8px 24px rgb(0 0 0 / .06);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --fondo: #0E0E0D;
    --superficie: #1a1917;
    --texto: #f2f1ec;
    --suave: #a3a19a;
    --borde: #33312d;
    --acento-texto: #FFC629;
    --error: #ff8a80;
    --error-fondo: #3a1714;
    --ok: #7dd3a8;
    --ok-fondo: #12301f;
    --info-fondo: #2e2610;
    --sombra: none;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--fondo);
  color: var(--texto);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}
a { color: var(--acento-texto); }
h1 { font-size: 1.6rem; line-height: 1.2; margin: .2em 0 .4em; }
h2 { font-size: 1.15rem; margin: .2em 0; }

/* Marca */
.marca { display: inline-flex; align-items: center; gap: .55rem; color: var(--texto); text-decoration: none; font-weight: 600; }
.marca-logo {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px;
  background: var(--marca); color: var(--acento); font-weight: 800; font-size: .95rem;
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / .08);
}
.marca-txt b { color: var(--acento-texto); }

/* Pantallas de cuenta: una tarjeta centrada */
.tarjeta-cuenta {
  width: min(100% - 32px, 420px);
  margin: 6vh auto 32px;
  background: var(--superficie);
  border: 1px solid var(--borde);
  border-radius: var(--radio);
  box-shadow: var(--sombra);
  padding: 24px 20px 20px;
}
.tarjeta-cuenta .marca { margin-bottom: 18px; }
.sub { color: var(--suave); margin: -.2em 0 1em; }

/* Formularios: controles grandes, cómodos con el dedo */
.formulario { display: grid; gap: 14px; margin: 8px 0 4px; }
.formulario label { display: grid; gap: 6px; font-weight: 600; font-size: .95rem; }
.formulario small { font-weight: 400; color: var(--suave); }
input[type=text], input[type=email], input[type=password] {
  width: 100%; min-height: 48px; padding: 10px 14px;
  font: inherit; font-size: 16px;   /* 16px evita que el iPhone haga zoom al tocar el campo */
  color: var(--texto); background: var(--fondo);
  border: 1px solid var(--borde); border-radius: 10px;
}
input:focus-visible { outline: 3px solid color-mix(in srgb, var(--acento) 70%, transparent); outline-offset: 1px; border-color: transparent; }
.clave { position: relative; display: block; }
.clave input { padding-right: 64px; }
.ver-clave {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  min-height: 36px; padding: 0 10px; border: 0; border-radius: 8px;
  background: transparent; color: var(--suave); font: inherit; font-size: .85rem; cursor: pointer;
}

/* Botones */
.boton {
  display: inline-flex; align-items: center; justify-content: center; gap: .4em;
  min-height: 48px; padding: 0 20px; border-radius: 12px; border: 1px solid transparent;
  font: inherit; font-weight: 700; text-decoration: none; cursor: pointer;
}
.boton-primario { background: var(--acento); color: #0E0E0D; }
.boton-primario:hover { filter: brightness(.96); }
.boton-fantasma { background: transparent; color: var(--texto); border-color: var(--borde); min-height: 40px; padding: 0 14px; }
.enlace { background: none; border: 0; padding: 0; color: var(--acento-texto); font: inherit; font-weight: 700; text-decoration: underline; cursor: pointer; }
.en-linea { display: inline; }
.enlaces { text-align: center; margin: 14px 0 0; color: var(--suave); }

/* Avisos */
.aviso { border-radius: 10px; padding: 12px 14px; margin: 0 0 14px; font-size: .95rem; }
.aviso-error { background: var(--error-fondo); color: var(--error); }
.aviso-ok { background: var(--ok-fondo); color: var(--ok); }
.aviso-info { background: var(--info-fondo); }

/* Panel */
.barra {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 16px; padding-top: max(10px, env(safe-area-inset-top));
  background: color-mix(in srgb, var(--superficie) 92%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--borde);
}
.contenido { width: min(100% - 32px, 960px); margin: 20px auto 40px; }
.vacio {
  text-align: center; padding: 40px 20px; margin-top: 16px;
  background: var(--superficie); border: 1px dashed var(--borde); border-radius: var(--radio);
}
.vacio-icono { font-size: 2.4rem; margin: 0; }
.vacio p { color: var(--suave); }

@media (min-width: 720px) {
  .tarjeta-cuenta { padding: 32px 32px 26px; }
  h1 { font-size: 1.9rem; }
}

/* Botón de Google y separador "o con tu correo" */
.google { display: grid; justify-items: center; min-height: 44px; margin: 4px 0 2px; }
.separador { display: flex; align-items: center; gap: 10px; color: var(--suave); font-size: .85rem; margin: 14px 0 4px; }
.separador::before, .separador::after { content: ""; flex: 1; height: 1px; background: var(--borde); }

/* ---------- Panel: restaurantes ---------- */
.barra-der { display: flex; align-items: center; gap: 10px; min-width: 0; }
.barra-usuario { color: var(--suave); font-size: .9rem; max-width: 40vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.titulo-fila { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.titulo-fila h1 { margin: .2em 0; }
.contenido-angosto { width: min(100% - 32px, 560px); }
.migas { margin: 0 0 6px; font-size: .9rem; }
.migas a { color: var(--suave); text-decoration: none; }
.tarjeta {
  background: var(--superficie); border: 1px solid var(--borde); border-radius: var(--radio);
  box-shadow: var(--sombra); padding: 18px; margin: 14px 0;
}
.tarjeta h2 { margin-bottom: 8px; }
.lista-restaurantes { list-style: none; margin: 14px 0; padding: 0; display: grid; gap: 10px; }
.tarjeta-restaurante {
  display: flex; align-items: center; gap: 12px; padding: 14px;
  background: var(--superficie); border: 1px solid var(--borde); border-radius: var(--radio);
  color: var(--texto); text-decoration: none; min-height: 64px;
}
.tarjeta-restaurante:hover { border-color: var(--acento); }
.tr-inicial { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--marca); color: var(--acento); font-weight: 800; font-size: 1.2rem; }
.tr-texto { display: grid; min-width: 0; flex: 1; }
.tr-texto b, .tr-texto small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tr-texto small { color: var(--suave); }
.tr-flecha { color: var(--suave); font-size: 1.6rem; line-height: 1; }
.etiqueta { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: .8rem; font-weight: 700; background: var(--fondo); border: 1px solid var(--borde); }
.etiqueta-error { background: var(--error-fondo); color: var(--error); border-color: transparent; }
.campo-slug { display: flex; align-items: stretch; border: 1px solid var(--borde); border-radius: 10px; background: var(--fondo); overflow: hidden; }
.campo-slug:focus-within { outline: 3px solid color-mix(in srgb, var(--acento) 70%, transparent); outline-offset: 1px; }
.campo-slug-prefijo { display: flex; align-items: center; padding: 0 2px 0 12px; color: var(--suave); font-weight: 400; font-size: .9rem; white-space: nowrap; }
.campo-slug input { border: 0; border-radius: 0; padding-left: 2px; min-width: 0; }
.campo-slug input:focus-visible { outline: none; }
.slug-ok { color: var(--ok); }
.slug-mal { color: var(--error); }
.url-publica { word-break: break-all; font-weight: 600; }
.acciones { display: flex; gap: 8px; flex-wrap: wrap; }
.pista { color: var(--suave); font-size: .9rem; margin-bottom: 0; }
.vacio .boton { margin-top: 6px; }
