/* TapLead: pagina profilo che si apre toccando la tessera. Telefono prima di tutto; tema scuro o chiaro dal profilo,
   colore principale come variabile (--tl-primary). Caratteri ospitati qui, niente Google. */
@font-face { font-family: Poppins; font-weight: 600; font-display: swap; src: url(/fonts/poppins-600.woff2) format('woff2'); }
@font-face { font-family: Poppins; font-weight: 700; font-display: swap; src: url(/fonts/poppins-700.woff2) format('woff2'); }
@font-face { font-family: Lato; font-weight: 400; font-display: swap; src: url(/fonts/lato-400.woff2) format('woff2'); }
@font-face { font-family: Lato; font-weight: 700; font-display: swap; src: url(/fonts/lato-700.woff2) format('woff2'); }

:root { --tl-primary: #3b82f6; --tl-bg: #06060b; --tl-bg2: #0c0c1f; --tl-surface: rgba(255,255,255,.05); --tl-border: rgba(255,255,255,.1);
  --tl-text: #fff; --tl-muted: #a3a3b8; --tl-input: rgba(255,255,255,.06); }
.tl-light { --tl-bg: #f7f7fa; --tl-bg2: #eef0f6; --tl-surface: #fff; --tl-border: rgba(12,12,31,.1); --tl-text: #0c0c1f; --tl-muted: #4b5065; --tl-input: #f3f4f8; }
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { background: linear-gradient(180deg, var(--tl-bg), var(--tl-bg2)); color: var(--tl-text); font: 16px/1.5 Lato, system-ui, sans-serif; }
body::before { content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background-image: linear-gradient(color-mix(in srgb, var(--tl-primary) 7%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in srgb, var(--tl-primary) 7%, transparent) 1px, transparent 1px); background-size: 64px 64px; }
.tl { position: relative; z-index: 1; max-width: 480px; margin: 0 auto; padding: 0 16px 40px; }
.tl-cover { height: 150px; margin: 0 -16px; background: radial-gradient(120% 140% at 20% 0%, color-mix(in srgb, var(--tl-primary) 55%, transparent), transparent 70%); }
.tl-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tl-head { display: flex; flex-direction: column; align-items: center; text-align: center; margin-top: -56px; gap: 6px; }
.tl-photo { width: 112px; height: 112px; border-radius: 50%; object-fit: cover; border: 4px solid var(--tl-bg); background: var(--tl-surface);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--tl-primary) 60%, transparent), 0 12px 40px color-mix(in srgb, var(--tl-primary) 30%, transparent); }
.tl-initials { display: flex; align-items: center; justify-content: center; font: 700 38px Poppins, sans-serif; color: var(--tl-primary); }
.tl-name { margin: 10px 0 0; font: 700 26px/1.2 Poppins, sans-serif; letter-spacing: -.01em; }
.tl-role { margin: 0; color: var(--tl-muted); }
.tl-bio { margin: 10px 0 0; color: var(--tl-muted); white-space: pre-line; }
.tl-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 8px; margin-top: 22px; }
.tl-btn { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 10px 14px; border-radius: 14px; text-decoration: none;
  font: 600 15px Poppins, sans-serif; color: var(--tl-text); background: var(--tl-surface); border: 1px solid var(--tl-border); cursor: pointer; }
.tl-btn:hover { border-color: var(--tl-primary); }
.tl-btn.main { grid-column: 1 / -1; background: var(--tl-primary); border-color: var(--tl-primary); color: #fff;
  box-shadow: 0 10px 30px color-mix(in srgb, var(--tl-primary) 35%, transparent); }
.tl-btn svg { width: 18px; height: 18px; flex: none; }
.tl-section { margin-top: 22px; display: flex; flex-direction: column; gap: 8px; }
.tl-section h2 { margin: 0 0 4px; font: 600 13px Poppins, sans-serif; text-transform: uppercase; letter-spacing: .08em; color: var(--tl-muted); }
.tl-link { justify-content: space-between; }
.tl-link span:last-child { color: var(--tl-muted); font-weight: 400; }
.tl-socials { display: flex; flex-wrap: wrap; gap: 8px; }
.tl-socials .tl-btn { min-height: 40px; padding: 8px 12px; font-size: 13px; }
.tl-video { position: relative; aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; border: 1px solid var(--tl-border); background: var(--tl-surface); }
.tl-video iframe, .tl-video button { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.tl-video button { background: none; color: var(--tl-text); font: 600 15px Poppins, sans-serif; cursor: pointer; }
.tl-card { background: var(--tl-surface); border: 1px solid var(--tl-border); border-radius: 18px; padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.tl-card h3 { margin: 0; font: 700 19px/1.3 Poppins, sans-serif; }
.tl-card p { margin: 0; color: var(--tl-muted); }
.tl-input { width: 100%; font: inherit; color: var(--tl-text); background: var(--tl-input); border: 1px solid var(--tl-border); border-radius: 12px; padding: 12px 14px; min-height: 48px; }
.tl-input:focus { outline: none; border-color: var(--tl-primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--tl-primary) 25%, transparent); }
textarea.tl-input { min-height: 90px; resize: vertical; }
.tl-consent { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--tl-muted); cursor: pointer; }
.tl-consent input { accent-color: var(--tl-primary); width: 20px; height: 20px; margin-top: 2px; flex: none; }
.tl-consent a { color: var(--tl-primary); }
.tl-error { color: #f87171; font-size: 14px; margin: 0; }
.tl-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.tl-chip { position: relative; cursor: pointer; }
.tl-chip input { position: absolute; opacity: 0; inset: 0; }
.tl-chip span { display: inline-flex; align-items: center; min-height: 40px; padding: 8px 14px; border-radius: 999px; font: 600 14px Poppins, sans-serif;
  background: var(--tl-input); border: 1px solid var(--tl-border); }
.tl-chip input:checked + span { background: var(--tl-primary); border-color: var(--tl-primary); color: #fff; }
.tl-chip input:focus-visible + span { box-shadow: 0 0 0 3px color-mix(in srgb, var(--tl-primary) 35%, transparent); }
.tl-ref { font: 700 30px Poppins, sans-serif; color: var(--tl-primary) !important; letter-spacing: .04em; }
.tl-trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.tl-foot { margin-top: 32px; text-align: center; font-size: 12px; color: var(--tl-muted); }
.tl-foot a { color: inherit; }
.tl-empty { min-height: 80vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 8px; }
.tl-empty h1 { font: 700 22px Poppins, sans-serif; margin: 0; }
.tl-empty p { color: var(--tl-muted); margin: 0; }
/* Pagina dei dati del cliente (dati-tessera.html): stessa grafica, campi con etichetta. */
.tl-intro { text-align: center; margin: 32px 0 6px; }
.tl-intro h1 { font: 700 24px/1.25 Poppins, sans-serif; margin: 0 0 8px; }
.tl-intro p { color: var(--tl-muted); margin: 0; }
.tl-field { display: flex; flex-direction: column; gap: 6px; }
.tl-field > span { font: 600 14px Poppins, sans-serif; }
.tl-field small { color: var(--tl-muted); font-size: 13px; }
.tl-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 420px) { .tl-row { grid-template-columns: 1fr; } }
.tl-pick { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.tl-pick img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; border: 2px solid var(--tl-border); }
.tl-pick .tl-btn { min-height: 44px; }
.tl-pick input[type=file] { display: none; }
.tl-pick .tl-cover-preview { width: 100%; height: auto; aspect-ratio: 3 / 1; margin: 0; border-radius: 12px; overflow: hidden; border: 1px solid var(--tl-border); }
.tl-pick .tl-cover-preview img { border-radius: 0; border: 0; width: 100%; height: 100%; }
.tl-note { font-size: 13px; color: var(--tl-muted); text-align: center; margin: 4px 0 0; }
.tl-note a { color: var(--tl-primary); }
