:root {
  --ink: #1a1414;
  --bg: #faf7f6;
  --card: #ffffff;
  --accent: #D72638;
  --accent-dark: #b81e2e;
  --accent-bright: #FD3535;
  --muted: #837878;
  --border: #ede4e3;
  --grad-1: #FB4D2A;
  --grad-2: #F72218;
  --grad-3: #F85C7B;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--ink);
}
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 24px;
  background: var(--ink);
  color: white;
}
.topbar .brand {
  display: flex;
  align-items: center;
  text-decoration: none;
}
.topbar .brand img { height: 26px; display: block; }
.topbar nav a {
  color: white;
  text-decoration: none;
  margin-left: 16px;
  opacity: 0.85;
}
.topbar nav a:hover { opacity: 1; }
.muted { color: var(--muted); font-size: 0.9rem; }
main { max-width: 720px; margin: 0 auto; padding: 40px 20px; }
.hero {
  text-align: left;
  padding: 90px 60px;
  border-radius: 20px;
  background: #fff url('/img/hero-illustration.svg') no-repeat center right;
  background-size: cover;
  border: 1px solid var(--border);
  color: var(--ink);
}
.hero img.hero-logo { height: 30px; margin-bottom: 28px; }
.hero h1 { font-size: 3rem; margin: 0 0 12px; max-width: 480px; }
.hero p { color: var(--muted); max-width: 420px; font-size: 1.05rem; }
.hero .btn-outline { color: var(--ink); border-color: var(--border); }
@media (max-width: 640px) {
  .hero { text-align: center; padding: 50px 24px; background-position: center bottom; }
  .hero h1, .hero p { max-width: none; }
}
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 20px;
}
.product h3 { margin-top: 0; }
.product-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 4px;
}
.product-header h3 { margin: 0; }
.product-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.product-title-group h3 { min-width: 0; overflow-wrap: break-word; }

/* ---- Link fijo de una vCard: destacado en negritas con su propio boton
   de copiar, para que sea facil de grabar en una tarjeta NFC fisica o de
   pegar como destino de otro producto. ---- */
.fixed-link-row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin: 4px 0 10px;
}
.fixed-link-url {
  font-weight: 700;
  font-size: 0.95rem;
  word-break: break-all;
}
.scan-badge {
  flex-shrink: 0;
  background: #FDEDEA;
  border-radius: 12px;
  padding: 8px 16px;
  text-align: center;
  line-height: 1.1;
}
.scan-badge-number {
  display: block;
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--accent);
}
.scan-badge-label {
  display: block;
  font-size: 0.72rem;
  color: var(--muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
label { display: block; margin-bottom: 16px; font-weight: 600; font-size: 0.9rem; }
input {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 400;
}
input:focus { outline: 2px solid var(--accent-bright); border-color: transparent; }
code {
  background: #f6efee;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.85rem;
  word-break: break-all;
}
.btn {
  display: inline-block;
  background: var(--accent);
  color: white;
  border: none;
  padding: 10px 18px;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  font-size: 1rem;
}
.btn:hover { background: var(--accent-dark); }
.btn-outline {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--border);
  margin-left: 8px;
}
.error { color: #c0392b; font-weight: 600; }
.success { color: #1a7a4c; font-weight: 600; }
.change-pwd-toggle { margin: 20px 0; }
.change-pwd-toggle a {
  display: block;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 20px;
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
  text-align: center;
}
.change-pwd-toggle a:hover { border-color: var(--accent); color: var(--accent); }
.change-pwd-toggle a.toggle-accent {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.change-pwd-toggle a.toggle-accent:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
  color: #fff;
}
.field-error { color: #c0392b; font-size: 0.85rem; margin: -10px 0 16px; }
.auth-forgot { text-align: center; margin: 18px 0 0; font-size: 0.88rem; }
.auth-forgot a { color: var(--muted); text-decoration: none; }
.auth-forgot a:hover { color: var(--accent); }
.pwd-row { display: flex; gap: 8px; align-items: stretch; }
.pwd-row input { flex: 1; margin-top: 0; }
.pwd-toggle {
  flex-shrink: 0;
  background: #f6efee;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0 14px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
}
.pwd-toggle:hover { background: var(--border); }
.small { font-size: 0.78rem; }
.admin-link { opacity: 0.55; font-size: 0.85rem; }
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th, .admin-table td {
  text-align: left;
  padding: 10px 8px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  font-size: 0.9rem;
}
.admin-row-form { display: flex; gap: 6px; flex-wrap: wrap; }
.admin-row-form input {
  width: auto;
  flex: 1 1 140px;
  margin-top: 0;
  padding: 6px 8px;
  font-size: 0.85rem;
}
.admin-row-form .field-error { flex-basis: 100%; margin: 0; }
.btn-small { padding: 6px 12px; font-size: 0.85rem; }
.scan-video {
  width: 100%;
  max-width: 420px;
  border-radius: 12px;
  background: #000;
  display: block;
  margin: 16px 0;
}
.pair-url {
  display: block;
  background: #f6efee;
  padding: 14px;
  border-radius: 8px;
  margin: 12px 0;
  font-size: 0.9rem;
  word-break: break-all;
}
#resultCard .btn { margin-right: 10px; margin-bottom: 8px; }
.tips-list { margin: 0; padding-left: 22px; }
.tips-list li { margin-bottom: 12px; line-height: 1.5; }
.tips-list li::marker { color: var(--accent); font-weight: 700; }
.tips-list a { color: var(--accent); font-weight: 600; }

/* ---- Landing / home: ancho completo, sin topbar, degradado edge-to-edge ---- */
body:has(.landing-hero) { margin: 0; }
.site-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 5;
  background: transparent;
}
.site-header-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 28px 60px 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 28px;
}
.site-header-link {
  color: var(--ink);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
}
.site-header-link:hover { color: var(--accent); }
.site-header-tienda {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 10px 24px;
  border-radius: 999px;
  text-decoration: none;
}
.site-header-tienda:hover { background: var(--accent-dark); }
@media (max-width: 900px) {
  /* En movil se quita el header por completo (sin hamburger, sin links). */
  .site-header { display: none; }
}
.landing-hero {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: #fff;
}
.landing-hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(900px circle at 8% 15%, rgba(251,77,42,0.08), transparent 58%),
    radial-gradient(700px circle at 0% 65%, rgba(248,92,123,0.07), transparent 55%),
    radial-gradient(600px circle at 30% 100%, rgba(215,38,56,0.04), transparent 60%);
}
.landing-hero-inner {
  position: relative;
  z-index: 1;
  max-width: 1160px;
  margin: 0 auto;
  padding: 48px 40px 70px;
  display: flex;
  align-items: center;
  gap: 70px;
}
.landing-logo { display: inline-block; margin-bottom: 40px; }
.landing-logo img { height: 24px; display: block; }
.landing-text { flex: 1 1 400px; }
.landing-text h1 {
  font-size: 3.8rem;
  font-weight: 800;
  line-height: 1.06;
  letter-spacing: -0.02em;
  margin: 0 0 22px;
  color: var(--ink);
}
.landing-text p {
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 460px;
  margin: 0 0 34px;
  line-height: 1.55;
}
.landing-visual { flex: 1 1 480px; display: flex; justify-content: center; position: relative; }
.landing-visual-blob {
  position: absolute;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--grad-1), var(--grad-3));
  opacity: 0.25;
  filter: blur(10px);
  z-index: 0;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}
.landing-visual img {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 640px;
  border-radius: 20px;
  box-shadow: 0 24px 48px rgba(215,38,56,0.18);
}

/* ---- formas decorativas flotantes ---- */
.deco { position: absolute; pointer-events: none; z-index: 1; }
.deco-sparkle-1 { width: 26px; height: 26px; top: 14%; left: 46%; fill: var(--accent-bright); opacity: 0.8; }
.deco-sparkle-2 { width: 16px; height: 16px; top: 68%; left: 40%; fill: var(--grad-3); opacity: 0.7; }
.deco-dot-1 { width: 12px; height: 12px; border-radius: 50%; background: var(--accent); top: 22%; left: 38%; opacity: 0.6; }
.deco-dot-2 { width: 8px; height: 8px; border-radius: 50%; background: var(--grad-1); top: 78%; right: 4%; opacity: 0.7; }
.deco-ring { width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--accent); top: 10%; right: 8%; opacity: 0.35; }

@media (max-width: 900px) {
  .deco { display: none; }
}

.btn-pill {
  display: inline-block;
  padding: 15px 32px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  background: var(--accent);
  color: white;
  margin-right: 14px;
}
.btn-pill:hover { background: var(--accent-dark); }
.btn-pill-outline {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--border);
}

@media (max-width: 900px) {
  .landing-hero-inner { flex-direction: column; text-align: center; gap: 0; padding: 32px 0 0; }
  .landing-logo { margin-bottom: 24px; margin-left: 24px; }
  .landing-text { padding: 0 24px; margin-bottom: 32px; }
  .landing-text h1 { font-size: 2.5rem; }
  .landing-text p { margin-left: auto; margin-right: auto; }
  .landing-text > div { display: flex; flex-direction: column; align-items: center; gap: 14px; }
  .btn-pill { margin-right: 0; width: 100%; max-width: 320px; text-align: center; }
  .landing-visual { width: 100%; flex: none; align-items: flex-start; background: #fff; padding: 0; }
  .landing-visual-blob { display: none; }
  .landing-visual img { max-width: 100%; border-radius: 0; box-shadow: none; display: block; }
}

/* ---- Seccion de caracteristicas debajo del hero ---- */
.content-card {
  max-width: 1160px;
  margin: 32px auto 48px;
  border-radius: 32px;
  box-shadow: 0 30px 70px rgba(26,20,20,0.07);
  overflow: hidden;
  background: #fff;
}
.features {
  max-width: none;
  margin: 0;
  padding: 20px 40px 40px;
}
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  border-top: 1px solid var(--border);
  padding-top: 56px;
}
.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #FDEDEA;
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 18px;
}
.feature h3 { font-size: 1.1rem; margin: 0 0 8px; }
.feature p { color: var(--muted); font-size: 0.95rem; line-height: 1.55; margin: 0; }

@media (max-width: 760px) {
  .content-card { border-radius: 0; box-shadow: none; margin: 0; max-width: 100%; }
  .features { padding: 10px 22px 56px; }
  .features-grid { grid-template-columns: 1fr; gap: 32px; text-align: center; }
  .feature-icon { margin-left: auto; margin-right: auto; }
}

/* ---- Footer ---- */
.site-footer {
  text-align: center;
  padding: 40px 20px 56px;
  border-top: 1px solid var(--border);
  background: #fff;
}
.footer-logo { height: 20px; margin-bottom: 12px; opacity: 0.85; }
.site-footer p { color: var(--muted); font-size: 0.85rem; margin: 0; }

/* ---- Tips + Social + Soporte, arriba del footer final ---- */
.footer-info {
  max-width: none;
  margin: 0;
  padding: 0 40px 40px;
}
.footer-info-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 56px;
  border-top: 1px solid var(--border);
  padding-top: 48px;
}
.footer-info h3 { font-size: 1rem; margin: 0 0 16px; }
.footer-info-side h3:not(:first-child) { margin-top: 28px; }
.social-links { display: flex; gap: 12px; flex-wrap: wrap; }
.social-links a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--ink);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
}
.social-links a:hover { border-color: var(--accent); color: var(--accent); }
.social-links svg { width: 17px; height: 17px; }
.footer-info-side p a { color: var(--accent); font-weight: 600; text-decoration: none; }

@media (max-width: 760px) {
  .footer-info { padding: 0 22px 10px; }
  .footer-info-grid { grid-template-columns: 1fr; gap: 36px; }
}

/* ---- Tarjeta de formulario para login/registro (va en .landing-visual) ---- */
.auth-form-card {
  position: relative;
  z-index: 1;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 40px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 24px 48px rgba(215,38,56,0.12);
}
.auth-sub { color: var(--muted); margin: 0 0 24px; font-size: 0.92rem; }
.auth-sub a { color: var(--accent); font-weight: 600; text-decoration: none; }
.auth-submit {
  width: 100%;
  text-align: center;
  border: none;
  cursor: pointer;
  margin-top: 6px;
}
.btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 12px 20px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  box-sizing: border-box;
}
.btn-google:hover { background: #f6efee; }
.auth-divider {
  display: flex;
  align-items: center;
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
  margin: 18px 0;
}
.auth-divider::before, .auth-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--border);
}
.auth-divider span { padding: 0 12px; }
.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 400;
  margin: 14px 0;
  cursor: pointer;
}
.checkbox-row input[type="checkbox"] {
  display: inline-block;
  width: auto;
  margin: 3px 0 0;
  flex-shrink: 0;
}

@media (max-width: 900px) {
  .auth-form-card { padding: 28px 24px; max-width: 100%; }
}

/* ---- Modal de login / registro (aparece encima del home) ---- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(26,20,20,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
}
.modal-overlay[hidden] { display: none; }
.modal-box {
  position: relative;
  background: #fff;
  border-radius: 20px;
  padding: 40px;
  width: 100%;
  max-width: 420px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 30px 60px rgba(0,0,0,0.28);
}
.modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  background: none;
  border: none;
  font-size: 1.7rem;
  line-height: 1;
  cursor: pointer;
  color: var(--muted);
  padding: 4px;
}
.modal-close:hover { color: var(--ink); }
.modal-panel h2 { font-size: 1.5rem; margin: 4px 0 10px; }

@media (max-width: 600px) {
  .modal-box { padding: 30px 22px; }
}

/* ---- Vista publica de una vCard (lo que ve quien toca/escanea el
   producto): tarjeta centrada con avatar circular y boton para guardar
   el .vcf en sus contactos. ---- */
.vcard-preview { max-width: 380px; margin: 40px auto; text-align: center; }
.vcard-avatar {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--grad-1), var(--grad-2));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  font-weight: 800;
}
.vcard-preview h2 { margin: 0 0 4px; }
.vcard-preview p { margin: 4px 0; }
.vcard-preview .btn { margin-top: 18px; }

/* ---- Saludo del dashboard ---- */
.dashboard-greeting {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 6px;
}
.dashboard-greeting h1 {
  margin: 0;
  font-size: 1.5rem;
  line-height: 1.3;
}
.dashboard-greeting-avatar {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  overflow: hidden;
  background: linear-gradient(135deg, var(--grad-1), var(--grad-2));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.2rem;
}
.dashboard-greeting-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.dashboard-sub { margin-top: 0; margin-bottom: 28px; }

@media (max-width: 600px) {
  .dashboard-greeting { gap: 10px; }
  .dashboard-greeting-avatar { width: 40px; height: 40px; font-size: 1rem; }
  .dashboard-greeting h1 { font-size: 1.15rem; }
}

/* ---- Vista previa redonda y chica de una foto (de perfil, o de una
   vCard), a un lado del campo de nombre en vez de una imagen grande
   aparte -- asi se ve de un vistazo si ya tiene foto o no. ---- */
.vcard-name-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.vcard-name-field { flex: 1 1 auto; margin-bottom: 16px; }
.vcard-avatar-thumb {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  background: linear-gradient(135deg, var(--grad-1), var(--grad-2));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1rem;
}
.vcard-avatar-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ---- Aviso flotante de "guardado" tras enviar un formulario ---- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  background: var(--ink);
  color: #fff;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.9rem;
  box-shadow: 0 12px 30px -10px rgba(0, 0, 0, 0.4);
  z-index: 50;
  opacity: 1;
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.toast::before { content: '✓ '; color: #6ee7a0; }
.toast-hide { opacity: 0; transform: translateX(-50%) translateY(8px); }

/* ---- Panel de administrador: menu lateral + pestañas ---- */
main.wide-main { max-width: 1100px; }
.admin-layout {
  display: flex;
  gap: 28px;
  align-items: flex-start;
}
.admin-sidebar {
  flex: 0 0 210px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: sticky;
  top: 24px;
}
.admin-tab-btn {
  display: block;
  width: 100%;
  text-align: left;
  padding: 11px 16px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  font-size: 0.92rem;
  cursor: pointer;
  text-decoration: none;
}
.admin-tab-btn:hover { background: var(--card); border-color: var(--border); }
.admin-tab-btn.is-active {
  background: linear-gradient(135deg, var(--grad-1), var(--grad-2));
  border-color: transparent;
  color: #fff;
}
.admin-tab-logout {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-weight: 600;
}
.admin-content { flex: 1 1 auto; min-width: 0; }
@media (max-width: 860px) {
  .admin-layout { flex-direction: column; }
  .admin-sidebar {
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    overflow-x: auto;
    position: static;
    width: 100%;
    height: auto;
    gap: 8px;
    padding-bottom: 6px;
  }
  /* Sin esto, cada pestaña hereda el "width: 100%" de la version de
     escritorio (donde se apilan una debajo de otra) y aqui, en una fila
     horizontal, cada una se estira al ancho completo del contenedor -- solo
     se alcanzaba a ver la primera pestaña, gigante, y las demas quedaban
     "escondidas" mas alla del scroll horizontal. */
  .admin-tab-btn { flex: 0 0 auto; width: auto; white-space: nowrap; }
  .admin-tab-logout { margin-top: 0; padding-top: 0; border-top: none; border-left: 1px solid var(--border); padding-left: 16px; }
}

/* ---- Dashboard de cliente: menu lateral en escritorio, lista plana en
   movil ---- */
.dash-desktop-view { display: none; }
.dash-mobile-view { display: block; }
@media (min-width: 861px) {
  .dash-desktop-view { display: block; }
  .dash-mobile-view { display: none; }
}

.product-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 4px;
}
.archive-form { margin: 0; }
.archive-link-btn {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--muted);
  text-decoration: underline;
  cursor: pointer;
}
.archive-link-btn:hover { color: var(--ink); }
.archive-link-btn.restore { color: var(--accent); }
.archive-link-btn.restore:hover { color: var(--accent-dark); }
.product-archived { opacity: 0.65; }
.product-archived:hover { opacity: 1; }

/* ---- Tabla "Todos los códigos": barra de busqueda/filtro, filas mas
   limpias, y una pastilla de color en vez de texto plano para el estado ---- */
.admin-filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin: 4px 0 18px;
}
.admin-filter-input {
  flex: 1 1 260px;
  margin: 0;
  max-width: 420px;
}
.admin-filter-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-weight: 500;
  font-size: 0.88rem;
  color: var(--muted);
  white-space: nowrap;
}
.admin-filter-toggle input { width: auto; margin: 0; }

.admin-table tbody tr:nth-child(even) { background: #fbf8f7; }
.admin-table tbody tr[hidden] { display: none; }
.admin-table td { vertical-align: top; }
.admin-code-links {
  display: flex;
  gap: 10px;
  margin-top: 6px;
  font-size: 0.8rem;
}
.link-btn {
  background: none;
  border: none;
  padding: 0;
  color: var(--accent);
  font-weight: 600;
  font-size: 0.8rem;
  cursor: pointer;
  text-decoration: underline;
}
.link-btn:hover { color: var(--accent-dark); }

.status-pill {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}
.status-pill.status-auto { background: #e6f6ec; color: #1a7a4c; }
.status-pill.status-admin { background: #fdedea; color: var(--accent-dark); }
.status-pill.status-unused { background: #f0eeec; color: var(--muted); }

/* ---- Seccion "Escribir NFC": el codigo recien generado, listo para
   pegar en una app de escritura NFC (ej. NFC Tools) ---- */
.nfc-write-result label { margin-bottom: 8px; }
.nfc-write-link-row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.nfc-write-url {
  flex: 1 1 260px;
  font-size: 0.95rem;
  padding: 10px 12px;
}
.nfc-write-qr {
  display: block;
  width: 180px;
  height: 180px;
  border: 1px solid var(--border);
  border-radius: 12px;
  margin: 4px 0 8px;
}


/* ==== Home Tapinci: secciones (orden tipo landing de producto) ==== */
html { scroll-behavior: smooth; }
.site-header-sep { width: 1px; height: 18px; background: var(--border); }

.tp-hero-bullets { list-style: none; padding: 0; margin: -6px 0 28px; display: grid; gap: 10px; }
.tp-hero-bullets li { display: flex; align-items: center; gap: 10px; font-weight: 600; color: var(--ink); }

.tp-yes, .tp-no {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; border-radius: 50%; flex-shrink: 0;
}
.tp-yes { background: #FDEDEA; color: var(--accent); }
.tp-no { background: #f1eded; color: #a59b9b; }
.tp-yes svg, .tp-no svg { width: 14px; height: 14px; }

.tp-section { padding: 72px 56px; border-top: 1px solid var(--border); scroll-margin-top: 20px; }
.content-card > .tp-section:first-child { border-top: 0; }
.tp-head { text-align: center; margin-bottom: 40px; }
.tp-eyebrow { display: inline-block; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.12em; color: var(--accent); margin-bottom: 10px; }
.tp-head h2 { font-size: 2.1rem; font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; margin: 0; color: var(--ink); }

.tp-three-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.tp-three-card { background: var(--bg); border-radius: 20px; padding: 28px; }
.tp-three-card h3 { font-size: 1.1rem; margin: 0 0 8px; }
.tp-three-card p { color: var(--muted); font-size: 0.95rem; line-height: 1.55; margin: 0; }

.tp-problem-list { max-width: 720px; margin: 0 auto; display: grid; gap: 16px; }
.tp-problem-item { display: flex; gap: 16px; align-items: flex-start; padding: 20px 24px; border: 1px solid var(--border); border-radius: 16px; }
.tp-problem-item p { margin: 0; line-height: 1.55; }

.tp-compare { background: var(--bg); }
.tp-cmp { max-width: 760px; margin: 0 auto; background: #fff; border-radius: 20px; overflow: hidden; box-shadow: 0 12px 40px rgba(26,20,20,0.06); }
.tp-cmp-row { display: grid; grid-template-columns: 1fr 120px 120px; align-items: center; border-top: 1px solid var(--border); }
.tp-cmp-row:first-child { border-top: 0; }
.tp-cmp-label { padding: 16px 24px; font-weight: 500; }
.tp-cmp-cell { display: flex; justify-content: center; padding: 16px 8px; height: 100%; align-items: center; box-sizing: border-box; }
.tp-cmp-hl { background: #FDF3F1; }
.tp-cmp-header { font-weight: 700; font-size: 0.9rem; }
.tp-cmp-header .tp-cmp-hl { color: var(--accent); }

.tapshop-section { scroll-margin-top: 20px; }

.tp-steps-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.tp-steps-grid li { position: relative; }
.tp-step-n { display: inline-flex; width: 40px; height: 40px; border-radius: 50%; background: var(--accent); color: #fff; font-weight: 800; align-items: center; justify-content: center; margin-bottom: 16px; }
.tp-steps-grid h3 { font-size: 1.05rem; margin: 0 0 6px; }
.tp-steps-grid p { color: var(--muted); font-size: 0.95rem; line-height: 1.55; margin: 0; }

.tp-faq-list { max-width: 760px; margin: 0 auto; }
.tp-faq-item { border-bottom: 1px solid var(--border); }
.tp-faq-item summary { cursor: pointer; list-style: none; padding: 20px 36px 20px 0; font-weight: 700; position: relative; }
.tp-faq-item summary::-webkit-details-marker { display: none; }
.tp-faq-item summary::after { content: '+'; position: absolute; right: 4px; top: 50%; transform: translateY(-50%); font-size: 1.4rem; color: var(--accent); font-weight: 400; }
.tp-faq-item[open] summary::after { content: '–'; }
.tp-faq-item p { margin: 0 0 20px; color: var(--muted); line-height: 1.6; }

.tp-final { text-align: center; padding: 72px 40px; background: linear-gradient(135deg, #FB4D2A 0%, #F72218 45%, #F85C7B 100%); color: #fff; }
.tp-final h2 { font-size: 2.2rem; font-weight: 800; letter-spacing: -0.02em; margin: 0 0 12px; }
.tp-final p { margin: 0 0 28px; opacity: 0.92; font-size: 1.05rem; }
.tp-final .btn-pill { background: #fff; color: var(--accent); }
.tp-final .btn-pill:hover { background: #fff3f1; }
.tp-final .btn-pill-outline { background: transparent; color: #fff; border-color: rgba(255,255,255,0.7); }
.tp-final .btn-pill-outline:hover { background: rgba(255,255,255,0.12); }

.tp-footer { background: var(--ink); color: #cfc6c6; margin-top: 0; }
.tp-footer-inner { max-width: 1160px; margin: 0 auto; padding: 56px 40px 36px; display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; }
.tp-footer-logo { height: 26px; display: block; margin-bottom: 16px; }
.tp-footer-brand p { margin: 0 0 18px; font-size: 0.92rem; line-height: 1.6; max-width: 320px; }
.tp-footer-social { display: flex; gap: 10px; }
.tp-footer-social a { width: 38px; height: 38px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.18); color: #fff; display: inline-flex; align-items: center; justify-content: center; }
.tp-footer-social a:hover { background: rgba(255,255,255,0.08); }
.tp-footer-social svg { width: 18px; height: 18px; }
.tp-footer-col h4 { color: #fff; font-size: 0.95rem; margin: 4px 0 14px; }
.tp-footer-col a { display: block; color: #cfc6c6; text-decoration: none; font-size: 0.92rem; margin-bottom: 10px; }
.tp-footer-col a:hover { color: #fff; }
.tp-footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); text-align: center; padding: 20px; font-size: 0.82rem; color: #9b9090; }

@media (max-width: 900px) {
  .tp-steps-grid { grid-template-columns: repeat(2, 1fr); }
  .tp-footer-inner { grid-template-columns: 1fr 1fr; }
  .tp-footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .tp-section { padding: 56px 22px; }
  .tp-head h2 { font-size: 1.7rem; }
  .tp-three-grid { grid-template-columns: 1fr; gap: 16px; }
  .tp-steps-grid { grid-template-columns: 1fr; text-align: center; }
  .tp-cmp-row { grid-template-columns: 1fr 72px 72px; }
  .tp-cmp-label { padding: 14px 16px; font-size: 0.92rem; }
  .tp-final { padding: 56px 22px; }
  .tp-final h2 { font-size: 1.7rem; }
  .tp-final .btn-pill { margin: 0 auto 12px; display: block; }
  .tp-hero-bullets { justify-items: start; width: fit-content; margin-left: auto; margin-right: auto; }
  .tp-three-card { text-align: center; }
  .tp-footer-inner { padding: 44px 22px 28px; gap: 28px; }
}
