:root {
  --vcard-primary: #5e5ce6;
  --vcard-primary-hover: #4b49d1;
  --vcard-secondary: #ffffff;
  --vcard-bg: #f5f7fb;
  --vcard-surface: #ffffff;
  --vcard-surface-alt: #f8f9fc;
  --vcard-text: #1f2937;
  --vcard-text-soft: #6b7280;
  --vcard-border: #e5e7eb;
  --vcard-accent: #ff453a;
  --vcard-success: #198754;
  --vcard-info: #0d6efd;
  --vcard-shadow-sm: 0 6px 20px rgba(15, 23, 42, 0.06);
  --vcard-shadow-md: 0 16px 40px rgba(15, 23, 42, 0.10);
  --vcard-radius-sm: 0.75rem;
  --vcard-radius-md: 1rem;
  --vcard-radius-lg: 1.5rem;
  --vcard-transition: all 0.25s ease;
}

html { min-height: 100%; overflow-x: hidden; }
body { min-height: 100%; overflow-x: hidden; }

body.vcard-body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: linear-gradient(180deg, #f8faff 0%, #f5f7fb 100%);
  color: var(--vcard-text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

/* Layout */
.vcard-main {
  flex: 1 0 auto; /* ocupa todo el espacio disponible, empuja el footer al fondo */
}

.vcard-footer {
  border-top: 1px solid var(--vcard-border);
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(8px);
}

.vcard-footer--public {
  background: #fff;
}

.vcard-footer-heading {
  color: var(--vcard-text);
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0;
  margin-bottom: 0.9rem;
}

.vcard-footer-list {
  display: grid;
  gap: 0.55rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.vcard-footer-list a,
.vcard-footer-inline a {
  color: var(--vcard-text-soft);
  font-size: 0.92rem;
  font-weight: 500;
  text-decoration: none;
}

.vcard-footer-list a:hover,
.vcard-footer-inline a:hover {
  color: var(--vcard-primary);
}

.vcard-footer-bottom {
  align-items: center;
  border-top: 1px solid var(--vcard-border);
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  margin-top: 2rem;
  padding-top: 1rem;
}

.vcard-footer-inline {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
}

.vcard-footer-inline span {
  color: var(--vcard-text-soft);
  font-size: 0.82rem;
}

@media (max-width: 767.98px) {
  .vcard-footer-bottom {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* Navbar */
.vcard-navbar {
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(229, 231, 235, 0.9);
  backdrop-filter: blur(10px);
  z-index: 1030; /* supera sticky-lg-top (1020) del sidebar del perfil */
}

.vcard-brand {
  color: var(--vcard-text);
  font-weight: 700;
  text-decoration: none;
  letter-spacing: -0.02em;
}

.vcard-brand:hover { color: var(--vcard-primary); }

.vcard-nav-link {
  color: var(--vcard-text-soft);
  font-weight: 500;
}

.vcard-nav-link:hover { color: var(--vcard-primary); }

/* Section helpers */
.vcard-section { padding: 3rem 0; }

.vcard-section-title {
  font-size: 1.9rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 0.75rem;
}

.vcard-section-subtitle {
  color: var(--vcard-text-soft);
  max-width: 720px;
}

.vcard-public-hero {
  padding: 4rem 0 2rem;
}

.vcard-public-eyebrow {
  color: var(--vcard-primary);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  margin-bottom: 0.65rem;
  text-transform: uppercase;
}

.vcard-public-title {
  color: var(--vcard-text);
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.08;
  margin-bottom: 1rem;
}

.vcard-public-lead {
  color: var(--vcard-text-soft);
  font-size: 1.05rem;
  line-height: 1.65;
  max-width: 760px;
}

.vcard-public-card {
  background: var(--vcard-surface);
  border: 1px solid rgba(229, 231, 235, 0.9);
  border-radius: var(--vcard-radius-md);
  box-shadow: var(--vcard-shadow-sm);
  height: 100%;
  padding: 1.35rem;
}

.vcard-public-card h2,
.vcard-public-card h3 {
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0;
  margin-bottom: 0.65rem;
}

.vcard-public-card p,
.vcard-legal-copy p {
  color: var(--vcard-text-soft);
  line-height: 1.65;
}

.vcard-public-list,
.vcard-legal-copy ul {
  color: var(--vcard-text-soft);
  line-height: 1.7;
  margin-bottom: 0;
}

.vcard-public-icon {
  align-items: center;
  background: rgba(94, 92, 230, 0.1);
  border-radius: 0.8rem;
  color: var(--vcard-primary);
  display: inline-flex;
  height: 2.65rem;
  justify-content: center;
  margin-bottom: 1rem;
  width: 2.65rem;
}

.vcard-legal-copy {
  max-width: 900px;
}

.vcard-legal-copy h2 {
  color: var(--vcard-text);
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0;
  margin: 2rem 0 0.65rem;
}

/* Buttons */
.btn-vcard-primary,
.btn-vcard-secondary,
.btn-vcard-ghost {
  border-radius: 0.9rem;
  padding: 0.75rem 1.15rem;
  font-weight: 600;
  transition: var(--vcard-transition);
  box-shadow: none;
}

.btn-vcard-primary {
  background: var(--vcard-primary);
  color: #fff;
  border: 1px solid var(--vcard-primary);
}

.btn-vcard-primary:hover,
.btn-vcard-primary:focus {
  background: var(--vcard-primary-hover);
  border-color: var(--vcard-primary-hover);
  color: #fff;
  transform: translateY(-1px);
}

.btn-vcard-secondary {
  background: #fff;
  color: var(--vcard-primary);
  border: 1px solid var(--vcard-primary);
}

.btn-vcard-secondary:hover,
.btn-vcard-secondary:focus {
  background: rgba(94, 92, 230, 0.06);
  color: var(--vcard-primary);
  transform: translateY(-1px);
}

.btn-vcard-ghost {
  background: transparent;
  color: var(--vcard-text);
  border: 1px solid var(--vcard-border);
}

.btn-vcard-ghost:hover,
.btn-vcard-ghost:focus {
  background: #fff;
  color: var(--vcard-primary);
  border-color: #d0d7de;
}

/* Cards */
.vcard-card {
  background: var(--vcard-surface);
  border: 1px solid rgba(229, 231, 235, 0.8);
  border-radius: var(--vcard-radius-lg);
  box-shadow: var(--vcard-shadow-sm);
}

.vcard-profile-card {
  overflow: hidden;
  transition: var(--vcard-transition);
}

.vcard-profile-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--vcard-shadow-md);
}

.vcard-profile-cover {
  height: 180px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
}

.vcard-profile-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(15, 23, 42, 0.10) 0%,
    rgba(15, 23, 42, 0.28) 100%
  );
}

.vcard-cover-fallback {
  background:
    radial-gradient(circle at top left, rgba(94, 92, 230, 0.35), transparent 35%),
    linear-gradient(135deg, #1d4ed8 0%, #5e5ce6 55%, #7c3aed 100%);
}

.vcard-profile-body {
  position: relative;
  padding: 0 1.5rem 1.5rem 1.5rem;
}

.vcard-avatar-wrap {
  margin-top: -54px;
  position: relative;
  z-index: 3;
}

.vcard-avatar {
  width: 108px;
  height: 108px;
  object-fit: cover;
  border: 4px solid #fff;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
}

.vcard-avatar-placeholder {
  width: 108px;
  height: 108px;
  border-radius: 50%;
  border: 4px solid #fff;
  background: linear-gradient(135deg, #dbe4ff 0%, #eef2ff 100%);
  color: var(--vcard-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
}

.vcard-name {
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 0.25rem;
}

.vcard-role {
  color: var(--vcard-text-soft);
  font-weight: 500;
  margin-bottom: 0.35rem;
}

.vcard-company {
  color: var(--vcard-text-soft);
  font-size: 0.95rem;
}

.vcard-bio {
  color: #374151;
  line-height: 1.6;
  margin-top: 1rem;
}

/* Badges */
.badge-vcard-primary,
.badge-vcard-info,
.badge-vcard-live,
.badge-vcard-soft {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border-radius: 999px;
  padding: 0.45rem 0.8rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.badge-vcard-primary {
  background: rgba(94, 92, 230, 0.12);
  color: var(--vcard-primary);
}

.badge-vcard-info {
  background: rgba(13, 110, 253, 0.1);
  color: var(--vcard-info);
}

.badge-vcard-live {
  background: rgba(255, 69, 58, 0.12);
  color: var(--vcard-accent);
}

.badge-vcard-soft {
  background: #f3f4f6;
  color: #4b5563;
}

/* Info blocks */
.vcard-info-box {
  background: var(--vcard-surface);
  border: 1px solid var(--vcard-border);
  border-radius: var(--vcard-radius-md);
  padding: 1rem;
  height: auto; /* deja que cada caja tome su altura natural */
}

/* Dentro de un row g-3, los pares de columnas igualan su altura */
.row > [class*="col"] > .vcard-info-box {
  height: 100%;
}

.vcard-info-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--vcard-text-soft);
  margin-bottom: 0.4rem;
  font-weight: 700;
}

.vcard-info-value {
  color: var(--vcard-text);
  text-decoration: none;
  word-break: break-word;
}

.vcard-info-value:hover { color: var(--vcard-primary); }

/* Social links */
.vcard-social-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.vcard-social-link {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 1px solid var(--vcard-border);
  color: var(--vcard-text);
  text-decoration: none;
  transition: var(--vcard-transition);
}

.vcard-social-link:hover {
  color: var(--vcard-primary);
  border-color: rgba(94, 92, 230, 0.35);
  transform: translateY(-2px);
  box-shadow: var(--vcard-shadow-sm);
}

/* States */
.vcard-state {
  background: var(--vcard-surface);
  border: 1px dashed #d1d5db;
  border-radius: var(--vcard-radius-lg);
  padding: 2rem 1.5rem;
}

.vcard-state-icon {
  font-size: 2.25rem;
  color: var(--vcard-primary);
}

.vcard-muted { color: var(--vcard-text-soft); }

/* Botón eliminar fila (formsets) */
.btn-trash {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  padding: 0.25rem 0.4rem;
  border-radius: var(--vcard-radius-sm);
  color: #dc3545;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--vcard-transition);
}
.btn-trash:hover {
  background: rgba(220, 53, 69, 0.1);
  color: #a71d2a;
}
.formset-row.marked-delete {
  opacity: 0.4;
  text-decoration: line-through;
  pointer-events: none;
}

/* QR placeholder */
.vcard-qr-box {
  background: linear-gradient(180deg, #fff 0%, #f8fafc 100%);
  border: 1px dashed #cbd5e1;
  border-radius: var(--vcard-radius-md);
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

/* ── Wallet icons ── */
.vcard-wallet-icon {
  width: 64px;
  height: 64px;
  border-radius: var(--vcard-radius-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.vcard-wallet-icon--sm {
  width: 44px;
  height: 44px;
  border-radius: var(--vcard-radius-sm);
}

/* ── Wallet modals ── */
.vcard-modal-content {
  border: none;
  border-radius: var(--vcard-radius-lg);
  overflow: hidden;
  box-shadow: var(--vcard-shadow-md);
}

.vcard-modal-header {
  border-bottom: none;
  padding: 1.25rem 1.5rem;
}

/* ── Steps list ── */
.vcard-steps-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.vcard-steps-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
}

.vcard-step-number {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(94, 92, 230, 0.12);
  color: var(--vcard-primary);
  font-size: 0.8rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 0.05rem;
}

/* Responsive */
@media (max-width: 767.98px) {
  .vcard-section { padding: 2rem 0; }
  .vcard-profile-cover { height: 150px; }
  .vcard-name { font-size: 1.5rem; }
  .vcard-profile-body { padding: 0 1rem 1rem 1rem; }
}
