/* ── Background images (assets/*.png) ─────────────────────────────
   violet-waves  — soft purple NFC waves (landing)
   dark-nfc      — deep indigo tech (login / install)
   light-mesh    — clean minimal mesh (dashboard)
   sunset-flow   — warm coral-purple (public profiles)
   nfc           — original NFC pattern
   Change defaults in config.php → background / background_auth
────────────────────────────────────────────────────────────────── */

.page-bg-base {
  min-height: 100vh;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

/* Light overlay — dashboard & landing */
.page-bg-violet-waves {
  background-color: #f5f3ff;
  background-image:
    linear-gradient(135deg, rgba(255, 255, 255, 0.88) 0%, rgba(245, 243, 255, 0.82) 100%),
    url('/assets/bg-violet-waves.png');
}

.page-bg-light-mesh {
  background-color: #f8fafc;
  background-image:
    linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(240, 253, 250, 0.85) 100%),
    url('/assets/bg-light-mesh.png');
}

.page-bg-sunset-flow {
  background-color: #fff7ed;
  background-image:
    linear-gradient(135deg, rgba(255, 255, 255, 0.85) 0%, rgba(253, 242, 248, 0.8) 100%),
    url('/assets/bg-sunset-flow.png');
}

.page-bg-nfc {
  background-color: #f5f3ff;
  background-image:
    linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(245, 243, 255, 0.85) 100%),
    url('/assets/nfc.png');
}

.page-bg-dark-nfc {
  background-color: #1e1b4b;
  background-image:
    linear-gradient(135deg, rgba(255, 255, 255, 0.82) 0%, rgba(238, 242, 255, 0.78) 100%),
    url('/assets/bg-dark-nfc.png');
}

/* Dark overlay — login & install */
.page-bg-auth-violet-waves {
  background-color: #6d28d9;
  background-image:
    linear-gradient(135deg, rgba(109, 40, 217, 0.8) 0%, rgba(126, 34, 206, 0.85) 100%),
    url('/assets/bg-violet-waves.png');
}

.page-bg-auth-dark-nfc {
  background-color: #312e81;
  background-image:
    linear-gradient(135deg, rgba(49, 46, 129, 0.75) 0%, rgba(109, 40, 217, 0.82) 100%),
    url('/assets/bg-dark-nfc.png');
}

.page-bg-auth-sunset-flow {
  background-color: #7c3aed;
  background-image:
    linear-gradient(135deg, rgba(124, 58, 237, 0.78) 0%, rgba(219, 39, 119, 0.75) 100%),
    url('/assets/bg-sunset-flow.png');
}

.page-bg-auth-nfc {
  background-color: #6d28d9;
  background-image:
    linear-gradient(135deg, rgba(109, 40, 217, 0.82) 0%, rgba(126, 34, 206, 0.88) 100%),
    url('/assets/nfc.png');
}

/* Apply shared bg properties */
.page-bg-violet-waves,
.page-bg-light-mesh,
.page-bg-sunset-flow,
.page-bg-nfc,
.page-bg-dark-nfc,
.page-bg-auth-violet-waves,
.page-bg-auth-dark-nfc,
.page-bg-auth-sunset-flow,
.page-bg-auth-nfc {
  min-height: 100vh;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

/* Legacy alias */
.page-bg-nfc-auth {
  min-height: 100vh;
  background-color: #6d28d9;
  background-image:
    linear-gradient(135deg, rgba(109, 40, 217, 0.82) 0%, rgba(126, 34, 206, 0.88) 100%),
    url('/assets/nfc.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

.card { background: white; border-radius: 1rem; box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1); }
.btn-primary { background: #7c3aed; color: white; padding: 0.625rem 1.25rem; border-radius: 0.75rem; font-weight: 600; display: inline-block; }
.btn-primary:hover { background: #6d28d9; }

/* ── Mobile NFC profile page (/u/...) ───────────────────────────── */
.profile-mobile-page {
  min-height: 100dvh;
  position: relative;
  overflow-x: hidden;
}

.profile-bg-layer {
  position: fixed;
  inset: 0;
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  z-index: 0;
  transform: scale(1.05);
}

.profile-bg-overlay {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.profile-wrap {
  position: relative;
  z-index: 2;
  max-width: 28rem;
  margin: 0 auto;
  padding: 0 1rem 2rem;
  min-height: 100dvh;
}

.profile-hero {
  text-align: center;
  padding: 2.5rem 1rem 1.5rem;
  color: #fff;
}

.profile-hero .profile-avatar {
  width: 7.5rem;
  height: 7.5rem;
  border-radius: 9999px;
  object-fit: cover;
  border: 4px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
  margin: 0 auto;
}

.profile-hero .profile-avatar-fallback {
  width: 7.5rem;
  height: 7.5rem;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  font-weight: 700;
  color: #fff;
  border: 4px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
  margin: 0 auto;
}

.profile-hero h1 {
  margin-top: 1rem;
  font-size: 1.75rem;
  font-weight: 800;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
  line-height: 1.2;
}

.profile-hero .profile-role {
  margin-top: 0.35rem;
  font-weight: 600;
  font-size: 1rem;
  opacity: 0.95;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.3);
}

.profile-hero .profile-company {
  margin-top: 0.2rem;
  font-size: 0.9rem;
  opacity: 0.88;
}

.profile-hero .profile-bio {
  margin-top: 0.85rem;
  font-size: 0.875rem;
  line-height: 1.5;
  opacity: 0.92;
  max-width: 20rem;
  margin-left: auto;
  margin-right: auto;
}

.profile-glass-card {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: 1.25rem;
  padding: 1.25rem;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.12);
  margin-bottom: 1rem;
}

.profile-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  min-height: 3.25rem;
  padding: 0.75rem 1rem;
  border-radius: 0.875rem;
  font-weight: 600;
  font-size: 1rem;
  transition: transform 0.15s, box-shadow 0.15s;
  text-decoration: none;
}

.profile-btn:active {
  transform: scale(0.98);
}

.profile-btn-primary {
  color: #fff;
  box-shadow: 0 8px 24px rgba(109, 40, 217, 0.35);
}

.profile-btn-whatsapp {
  background: #22c55e;
  color: #fff;
  box-shadow: 0 8px 24px rgba(34, 197, 94, 0.3);
}

.profile-btn-outline {
  background: rgba(255, 255, 255, 0.85);
  border: 2px solid rgba(124, 58, 237, 0.2);
  color: #4c1d95;
}

.profile-social-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
}

.profile-social-grid a {
  text-align: center;
  padding: 0.55rem 0.25rem;
  border-radius: 0.65rem;
  background: rgba(237, 233, 254, 0.9);
  color: #6d28d9;
  font-size: 0.68rem;
  font-weight: 600;
  text-decoration: none;
}

.profile-nfc-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: linear-gradient(135deg, #7c3aed, #9333ea);
  color: #fff;
  text-align: center;
  font-size: 0.8rem;
  padding: 0.75rem 1rem;
  box-shadow: 0 4px 20px rgba(109, 40, 217, 0.4);
}

.profile-footer {
  text-align: center;
  padding: 1.5rem 0 0.5rem;
}

.profile-footer img {
  height: 2rem;
  width: auto;
  margin: 0 auto;
  opacity: 0.75;
  object-fit: contain;
}

.profile-footer p {
  margin-top: 0.5rem;
  font-size: 0.7rem;
  color: rgba(71, 85, 105, 0.85);
}

.profile-lead-form input,
.profile-lead-form textarea {
  width: 100%;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  padding: 0.65rem 0.85rem;
  font-size: 0.875rem;
  background: #fff;
}

.profile-lead-form input:focus,
.profile-lead-form textarea:focus {
  outline: none;
  border-color: #a78bfa;
  box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.25);
}

@media (max-width: 640px) {
  .page-bg-sunset-flow,
  .page-bg-violet-waves,
  .page-bg-nfc,
  .page-bg-dark-nfc,
  .page-bg-light-mesh {
    background-attachment: scroll;
  }
}
