/* AutiX · Estilos mobile-first (los colores vienen de config.js) */
:root {
  --primario: #0f172a;
  --acento: #f97316;
  --fondo: #f1f5f9;
  --texto: #1e293b;
  --muted: #64748b;
  --card: #ffffff;
  --borde: #e2e8f0;
  --ok: #16a34a;
  --cerrado: #dc2626;
  --radio: 14px;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  background: var(--fondo);
  color: var(--texto);
  -webkit-tap-highlight-color: transparent;
}

.container { max-width: 520px; margin: 0 auto; padding: 12px 12px 32px; }

/* Encabezado */
.app-header {
  background: linear-gradient(135deg, var(--primario), #1e293b);
  color: #fff;
  padding: 18px 14px;
  display: flex; align-items: center; gap: 12px;
  position: sticky; top: 0; z-index: 10;
}
.logo { width: 52px; height: 52px; border-radius: 12px; background: #fff; }
.header-text { flex: 1; min-width: 0; }
.header-text h1 { margin: 0; font-size: 1.15rem; }
.header-text p { margin: 2px 0 0; font-size: .8rem; opacity: .75; }
.badge {
  font-size: .72rem; font-weight: 700; white-space: nowrap;
  padding: 6px 10px; border-radius: 999px; background: #334155;
}
.badge.open { background: var(--ok); }
.badge.closed { background: var(--cerrado); }

/* Botones de acción rápida */
.cta-row { display: flex; gap: 10px; margin: 12px 0; }
.cta {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px;
  background: var(--card); border: 1px solid var(--borde); border-radius: var(--radio);
  padding: 12px 6px; text-decoration: none; color: var(--texto);
  font-size: .82rem; font-weight: 600;
}
.cta-icon { font-size: 1.4rem; }
.cta-accent { background: #25d366; border-color: #25d366; color: #fff; }

/* Tarjetas */
.card {
  background: var(--card); border: 1px solid var(--borde);
  border-radius: var(--radio); padding: 16px; margin: 12px 0;
}
.card h2 { margin: 0 0 4px; font-size: 1.05rem; }
.muted { color: var(--muted); font-size: .85rem; margin: 4px 0 12px; }

/* Formulario */
label { display: block; font-size: .85rem; font-weight: 600; margin: 10px 0; }
input, select, textarea {
  width: 100%; margin-top: 6px; padding: 11px 12px;
  border: 1px solid var(--borde); border-radius: 10px; font-size: 1rem;
  font-family: inherit; background: #fff; color: var(--texto);
}
input:focus, select:focus, textarea:focus {
  outline: 2px solid var(--acento); border-color: var(--acento);
}
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grid-2 label { margin: 6px 0; }
small.muted { font-weight: 400; }

.pills { border: none; padding: 0; margin: 12px 0; }
.pills legend { font-size: .85rem; font-weight: 600; padding: 0; }
.pills label {
  display: inline-block; margin: 6px 6px 0 0; cursor: pointer;
}
.pills input { display: none; }
.pills span {
  display: inline-block; padding: 9px 14px; border-radius: 999px;
  border: 1px solid var(--borde); background: #fff;
  font-size: .85rem; font-weight: 600;
}
.pills input:checked + span {
  background: var(--primario); color: #fff; border-color: var(--primario);
}

.btn-primary, .btn-secondary, .btn-ath, .btn-install {
  display: block; width: 100%; text-align: center;
  padding: 14px; border: none; border-radius: 12px;
  font-size: 1rem; font-weight: 700; cursor: pointer; text-decoration: none;
}
.btn-primary { background: var(--acento); color: #fff; margin-top: 14px; }
.btn-secondary { background: var(--primario); color: #fff; }
.btn-ath {
  background: #6d28d9; color: #fff; margin-top: 8px;
}
.btn-install {
  background: var(--primario); color: #fff; margin: 16px 0;
  position: sticky; bottom: 12px; box-shadow: 0 6px 20px rgba(0,0,0,.25);
}
.hint {
  background: #fef9c3; border: 1px solid #fde047; color: #854d0e;
  border-radius: 10px; padding: 10px 12px; font-size: .85rem; margin-top: 12px;
}
.error {
  background: #fee2e2; border: 1px solid #fca5a5; color: #991b1b;
  border-radius: 10px; padding: 10px 12px; font-size: .85rem; margin-top: 12px;
}

/* Redes */
.social-row { display: flex; gap: 10px; }
.social {
  flex: 1; text-align: center; padding: 12px 6px; border-radius: 10px;
  background: var(--fondo); border: 1px solid var(--borde);
  text-decoration: none; color: var(--texto); font-weight: 600; font-size: .9rem;
}

/* Horario */
.hours { list-style: none; padding: 0; margin: 0 0 8px; }
.hours li { padding: 7px 0; border-bottom: 1px dashed var(--borde); font-size: .92rem; }
.hours li:last-child { border-bottom: none; }

.footer { text-align: center; padding: 18px 12px 28px; color: var(--muted); }

/* Tablón de anuncios */
.anuncios { display: grid; gap: 10px; }
.anuncio {
  border: 1px solid var(--borde); border-left: 5px solid var(--muted);
  border-radius: 10px; padding: 12px; background: #fff;
}
.anuncio h3 { margin: 6px 0 4px; font-size: .98rem; }
.anuncio p { margin: 0 0 6px; font-size: .9rem; }
.badge-tipo {
  display: inline-block; font-size: .68rem; font-weight: 700;
  padding: 3px 10px; border-radius: 999px; color: #fff;
  text-transform: uppercase; letter-spacing: .05em;
}
.t-oferta { background: var(--acento); }
.t-aviso { background: #2563eb; }
.t-nuevo { background: var(--ok); }
.btn-cta-anuncio {
  display: inline-block; margin-top: 8px; padding: 9px 16px;
  background: #25d366; color: #fff; border-radius: 999px;
  text-decoration: none; font-size: .85rem; font-weight: 700;
}
.small { font-size: .75rem; }
