:root {
  --primary-color: #0f172a;
  --secondary-color: #0085dd;
  --accent-color: #2c93fd;
  --text-main: #181718;
  --text-muted: #64748b;
  --bg-gradient-start: #f8fafc;
  --bg-gradient-end: #edf2f7;
  --card-bg: #ffffff;
  --card-border: rgba(226, 232, 240, 0.9);
  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: linear-gradient(135deg, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 100%);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  line-height: 1.5;
}

.container {
  width: 100%;
  max-width: 520px;
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 24px;
  padding: 38px 30px;
  text-align: center;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(8px);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: linear-gradient(90deg, #2c93fd 0%, #0085dd 100%);
}

/* Encabezado Co-Branding (Smichowski Asesores + Seguros Rivadavia) */
.brand-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.agency-logo {
  max-width: 210px;
  height: auto;
  display: block;
}

.brand-divider {
  width: 1.5px;
  height: 38px;
  background-color: #cbd5e1;
}

.partner-logo {
  max-width: 145px;
  height: auto;
  display: block;
}

@media (max-width: 440px) {
  .brand-header {
    gap: 12px;
  }
  .agency-logo {
    max-width: 180px;
  }
  .partner-logo {
    max-width: 125px;
  }
  .brand-divider {
    height: 30px;
  }
}

.tagline {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #0284c7;
  background: rgba(44, 147, 253, 0.1);
  padding: 5px 14px;
  border-radius: 20px;
  margin-bottom: 14px;
}

.title {
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--primary-color);
  margin-bottom: 8px;
}

.description {
  font-size: 0.94rem;
  color: var(--text-muted);
  margin-bottom: 26px;
  padding: 0 8px;
  line-height: 1.6;
}

/* Estado de Redirección Automática (Móvil) */
.redirect-status {
  padding: 20px 0;
}

.spinner {
  width: 44px;
  height: 44px;
  border: 4px solid rgba(44, 147, 253, 0.15);
  border-top-color: var(--accent-color);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 16px auto;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.redirect-status p {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--primary-color);
  margin-bottom: 6px;
}

.redirect-status small {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Botones de Descarga de Tiendas */
.store-buttons {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 15px;
}

.store-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  text-decoration: none;
}

.store-btn:hover {
  transform: translateY(-2px);
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.15));
}

.store-btn img {
  height: 48px;
  width: auto;
  border-radius: 6px;
}

/* Sección de QR para Escritorio */
.desktop-qr-section {
  display: none;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid #f1f5f9;
}

.qr-preview-box {
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 16px;
  padding: 16px;
  display: inline-block;
  margin: 12px auto;
}

.qr-preview-box img, .qr-preview-box canvas {
  display: block;
  margin: 0 auto;
}

.desktop-qr-section p {
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* Enlace manual directo */
.manual-link {
  display: inline-block;
  margin-top: 20px;
  font-size: 0.88rem;
  color: var(--accent-color);
  text-decoration: underline;
  cursor: pointer;
}

.manual-link:hover {
  color: var(--secondary-color);
}

.footer {
  margin-top: 24px;
  font-size: 0.78rem;
  color: #94a3b8;
  text-align: center;
  line-height: 1.5;
}

.footer strong {
  color: #64748b;
}
