/* ═══════════════════════════════════════════════════════════════════
   MYAGENT.CSS — la pagina del prodotto (myagent.php)
   Usa i token e i componenti di sito.css; qui solo i pezzi propri.
   ═══════════════════════════════════════════════════════════════════ */

/* ── 1. APERTURA ──────────────────────────────────────────────────── */
.ma-apertura {
  position: relative;
  min-height: 100vh; min-height: 100svh;
  display: flex; align-items: center;
  padding: 130px 0 90px;
  margin-top: 10px;
}
.ma-apertura::after { /* il sole rosso delle postazioni, dietro alla console */
  content: ''; position: absolute; right: -16vmax; top: 50%; z-index: -1;
  width: 70vmax; height: 70vmax; translate: 0 -50%; border-radius: 50%;
  background: radial-gradient(circle, #ff5a1f 0 5%, #e2400c 5% 10%, #b82b08 10% 17%, #8a1d06 17% 25%, #5c1305 25% 34%, #300b04 34% 45%, #150706 45% 56%, transparent 66%);
  opacity: .75;
}
.ma-apertura-in { display: grid; gap: clamp(40px, 5vw, 80px); align-items: center; }
@media (min-width: 1000px) { .ma-apertura-in { grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); } }
.ma-apertura-testo { display: flex; flex-direction: column; align-items: flex-start; gap: 1.5rem; }
.ma-apertura .t-display { font-size: clamp(2.8rem, 6vw, 5.6rem); }
.ma-garanzie { display: flex; flex-wrap: wrap; gap: .5rem 1.4rem; }
.ma-garanzie li { position: relative; padding-left: 1.2rem; font-family: var(--f-mono); font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; color: var(--notte-ink-2); }
.ma-garanzie li::before { content: '✓'; position: absolute; left: 0; color: var(--arancio); }

/* ── LA CONSOLE (la chat vera) ─────────────────────────────────────── */
.console {
  position: relative;
  display: flex; flex-direction: column;
  height: min(620px, 74vh);
  border-radius: 26px; overflow: hidden;
  background: linear-gradient(180deg, rgba(28,29,33,.92), rgba(16,17,20,.94));
  border: 1px solid rgba(255,255,255,.1);
  box-shadow: 0 60px 120px -40px rgba(0,0,0,.8), 0 0 0 1px rgba(255,255,255,.03) inset, 0 0 80px -20px rgba(255,90,31,.25);
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  color: var(--notte-ink);
}
.console-testa { display: flex; align-items: center; gap: .8rem; padding: 1rem 1.1rem; border-bottom: 1px solid rgba(255,255,255,.08); }
.console-testa strong { display: block; font-size: 1.02rem; letter-spacing: -.02em; }
.console-faccia { display: inline-flex; align-items: center; justify-content: center; gap: 7px; width: 46px; height: 34px; border-radius: 10px; background: #0b0b0d; border: 1px solid rgba(255,255,255,.12); flex: 0 0 auto; }
.console-faccia i { width: 6px; height: 8px; border-radius: 3px; background: #ff8a3d; box-shadow: 0 0 8px rgba(255,138,61,.7); animation: battito-occhi 5s infinite; }
@keyframes battito-occhi { 0%, 92%, 100% { transform: none; } 95% { transform: scaleY(.15); } }
.console-stato { display: inline-flex; align-items: center; gap: .45rem; font-family: var(--f-mono); font-size: .62rem; letter-spacing: .08em; text-transform: uppercase; color: var(--notte-ink-2); }
.console-stato i { width: 7px; height: 7px; border-radius: 50%; background: #2fbf5b; box-shadow: 0 0 0 3px rgba(47,191,91,.18); }
.console-dal-vivo { margin-left: auto; padding: .3rem .55rem; border-radius: 6px; background: rgba(255,90,31,.14); color: var(--arancio-2); font-family: var(--f-mono); font-size: .6rem; letter-spacing: .14em; text-transform: uppercase; }
.console-corpo { flex: 1; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: .7rem; padding: 1.2rem 1.1rem; scroll-behavior: smooth; }
.console-corpo::-webkit-scrollbar { width: 0; }
.cmsg { max-width: 86%; padding: .75rem .95rem; border-radius: 18px; font-size: .95rem; line-height: 1.5; animation: cmsg .45s var(--molla) both; }
@keyframes cmsg { from { opacity: 0; transform: translateY(10px) scale(.98); } }
.cmsg--io { align-self: flex-end; background: var(--arancio); color: #fff; border-bottom-right-radius: 6px; }
.cmsg--agente { align-self: flex-start; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.08); border-bottom-left-radius: 6px; }
.cmsg a { color: var(--arancio-2); text-decoration: underline; text-underline-offset: 2px; }
.cmsg-meta { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .6rem; }
.cmsg-meta span { padding: .22rem .5rem; border-radius: 6px; background: rgba(255,255,255,.06); font-family: var(--f-mono); font-size: .58rem; letter-spacing: .08em; text-transform: uppercase; color: var(--notte-ink-2); }
.cmsg-meta .cmsg-tempo { color: #2fbf5b; }
.cmsg-meta .cmsg-fonte::before { content: '↳ '; color: var(--arancio-2); }
.cmsg-vai { display: inline-block; margin-top: .55rem; font-family: var(--f-mono); font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; color: var(--arancio-2) !important; text-decoration: none !important; }
.cmsg--scrive { display: flex; gap: 5px; padding: 1rem 1.1rem; }
.cmsg--scrive i { width: 7px; height: 7px; border-radius: 50%; background: var(--notte-ink-2); animation: punto 1.3s ease-in-out infinite; }
.cmsg--scrive i:nth-child(2) { animation-delay: .15s; } .cmsg--scrive i:nth-child(3) { animation-delay: .3s; }
.cmsg--sistema { align-self: center; background: none; border: 0; padding: .2rem; font-family: var(--f-mono); font-size: .62rem; letter-spacing: .12em; text-transform: uppercase; color: var(--arancio-2); }
.console-rapide { display: flex; flex-wrap: wrap; gap: .4rem; padding: 0 1.1rem .7rem; }
.console-rapide button { padding: .45rem .8rem; border-radius: 999px; border: 1px solid rgba(255,255,255,.16); color: var(--notte-ink); font-size: .84rem; background: rgba(255,255,255,.04); transition: border-color .2s, background-color .2s; }
.console-rapide button:hover { border-color: var(--arancio); background: rgba(255,90,31,.12); }
.console-form { display: flex; gap: .5rem; padding: .8rem; border-top: 1px solid rgba(255,255,255,.08); }
.console-form input { flex: 1; min-width: 0; padding: .85rem 1rem; border-radius: 999px; border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.05); color: #fff; font: inherit; font-size: .96rem; }
.console-form input::placeholder { color: #8a8a92; }
.console-form input:focus { outline: none; border-color: var(--arancio); box-shadow: 0 0 0 4px rgba(255,90,31,.18); }
.console-form button { width: 48px; height: 48px; border-radius: 50%; background: var(--arancio); color: #fff; font-size: 1.15rem; flex: 0 0 auto; transition: transform .3s var(--molla); }
.console-form button:hover { transform: scale(1.06); }
.console-nota { padding: 0 1.1rem .9rem; font-family: var(--f-mono); font-size: .58rem; letter-spacing: .08em; text-transform: uppercase; color: #77777f; }
.console.attesa .console-form { opacity: .5; pointer-events: none; }

/* ── 2. NUMERI ────────────────────────────────────────────────────── */
.ma-numeri { display: grid; gap: 2rem 1.6rem; grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 2rem 0; border-top: 1px solid var(--riga-2); border-bottom: 1px solid var(--riga-2); }
@media (min-width: 900px) { .ma-numeri { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.ma-numeri .numero b i { font-size: .45em; margin-left: .1em; }

/* ── 3. COME FUNZIONA ─────────────────────────────────────────────── */
.passaggi { display: grid; gap: 2rem; }
@media (min-width: 1000px) { .passaggi { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 4rem; } }
.passaggio { min-height: 68vh; display: flex; flex-direction: column; justify-content: center; gap: .9rem; opacity: .32; transition: opacity .5s; }
.passaggio.attivo { opacity: 1; }
.passaggio p { color: var(--ink-2); max-width: 48ch; }
@media (max-width: 999px) { .passaggio { min-height: auto; opacity: 1; padding: 1.4rem 0; } }

.palco {
  position: sticky; top: 14vh; height: 72vh; min-height: 460px;
  border-radius: 26px; overflow: hidden;
  background: #111214;
  background-image:
    linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 24px 24px;
  border: 1px solid rgba(255,255,255,.08);
  box-shadow: var(--om-2);
  color: var(--notte-ink);
}
@media (max-width: 999px) { .palco { position: relative; top: 0; height: 440px; min-height: 0; order: -1; } }
.palco-barra { display: flex; align-items: center; gap: .8rem; padding: .8rem 1rem; border-bottom: 1px solid rgba(255,255,255,.08); background: rgba(255,255,255,.03); }
.palco-punti { display: inline-flex; gap: .3rem; }
.palco-punti i { width: 9px; height: 9px; border-radius: 50%; background: #3a3b40; }
.palco-punti i:nth-child(1) { background: #ff5f57; } .palco-punti i:nth-child(2) { background: #febc2e; } .palco-punti i:nth-child(3) { background: #28c840; }
.palco-titolo { font-size: .85rem; font-weight: 600; }
.palco-passo { margin-left: auto; font-family: var(--f-mono); font-size: .66rem; letter-spacing: .1em; color: var(--arancio-2); }
.palco-esempio { position: absolute; right: 14px; bottom: 12px; font-family: var(--f-mono); font-size: .56rem; letter-spacing: .12em; text-transform: uppercase; color: #6e6e76; }
.lab-barra .palco-esempio, .canali-vista .palco-esempio { position: static; margin-left: auto; }
.canali-vista .palco-esempio { position: absolute; }
.scena-eti { font-family: var(--f-mono); font-size: .62rem; letter-spacing: .12em; text-transform: uppercase; color: #8a8a92; margin-bottom: .8rem; }

.scena { position: absolute; inset: 50px 0 0; padding: clamp(20px, 3vw, 40px); display: flex; flex-direction: column; justify-content: center; opacity: 0; transform: translateY(16px) scale(.98); transition: opacity .6s var(--molla), transform .8s var(--molla); pointer-events: none; }
.palco[data-scena="1"] .scena-1, .palco[data-scena="2"] .scena-2, .palco[data-scena="3"] .scena-3 { opacity: 1; transform: none; }

/* scena 1: la lettura delle pagine */
.scansione { display: grid; gap: .45rem; }
.scansione li { position: relative; display: grid; grid-template-columns: 90px 1fr 18px; align-items: center; gap: .8rem; padding: .6rem .8rem; border-radius: 10px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.06); font-size: .9rem; overflow: hidden; opacity: .35; transition: opacity .3s, border-color .3s; }
.scansione li span { font-family: var(--f-mono); font-size: .7rem; color: #8a8a92; }
.scansione li b { font-weight: 500; }
.scansione li i { width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid #4a4b50; }
.scansione li.letta { opacity: 1; border-color: rgba(47,191,91,.3); }
.scansione li.letta i { border-color: #2fbf5b; background: #2fbf5b; box-shadow: inset 0 0 0 3px #111214; }
.scansione li.in-lettura { opacity: 1; border-color: rgba(255,90,31,.5); }
.scansione li.in-lettura::after { content: ''; position: absolute; top: 0; bottom: 0; left: 0; width: 30%; background: linear-gradient(90deg, transparent, rgba(255,90,31,.25), transparent); animation: legge .8s linear infinite; }
@keyframes legge { from { transform: translateX(-100%); } to { transform: translateX(400%); } }
.scena-barra { height: 4px; border-radius: 4px; background: rgba(255,255,255,.08); margin: 1.2rem 0 .7rem; overflow: hidden; }
.scena-barra span { display: block; height: 100%; width: 0; background: var(--sfumato); border-radius: 4px; transition: width .4s; }
.scena-conto { font-family: var(--f-mono); font-size: .72rem; letter-spacing: .06em; color: #a1a1aa; }
.scena-conto b { color: #fff; font-weight: 500; }

/* scena 2: dalla fonte alla risposta */
.fonte { padding: 1rem 1.1rem; border-radius: 14px; background: #f5f5f7; color: var(--ink); font-size: .95rem; line-height: 1.6; }
.fonte .scena-eti { color: var(--ink-3); }
.fonte mark { background: rgba(255,90,31,.22); color: var(--ink); padding: .05em .2em; border-radius: 4px; box-shadow: inset 0 -2px 0 var(--arancio); }
.filo { width: 2px; height: 40px; margin: .4rem 0 .4rem 40px; background: repeating-linear-gradient(to bottom, var(--arancio) 0 5px, transparent 5px 9px); }
.scambio { display: flex; flex-direction: column; gap: .55rem; }
.bolla { max-width: 88%; padding: .7rem .9rem; border-radius: 16px; font-size: .92rem; line-height: 1.45; }
.bolla--cliente { align-self: flex-end; background: var(--arancio); color: #fff; border-bottom-right-radius: 5px; }
.bolla--agente { align-self: flex-start; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.08); color: var(--notte-ink); border-bottom-left-radius: 5px; }
.bolla small { display: block; margin-top: .4rem; font-family: var(--f-mono); font-size: .58rem; letter-spacing: .1em; text-transform: uppercase; color: var(--arancio-2); }
.palco[data-scena="2"] .scambio .bolla { animation: cmsg .5s var(--molla) both; }
.palco[data-scena="2"] .scambio .bolla:nth-child(2) { animation-delay: .5s; }

/* scena 3: il contatto */
.contatto { padding: 1.1rem; border-radius: 16px; background: #f5f5f7; color: var(--ink); }
.contatto-testa { display: flex; align-items: center; gap: .75rem; margin-bottom: 1rem; }
.contatto-testa strong { display: block; }
.contatto-testa span { font-size: .8rem; color: var(--ink-3); }
.contatto-avatar { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--ink); color: #fff; font-size: .74rem; font-weight: 600; flex: 0 0 auto; }
.contatto-prio { margin-left: auto; padding: .28rem .55rem; border-radius: 6px; background: rgba(255,90,31,.15); color: var(--arancio-ink); font-family: var(--f-mono); font-size: .6rem; letter-spacing: .1em; text-transform: uppercase; white-space: nowrap; }
.contatto-prio--media { background: rgba(254,188,46,.2); color: #8a5a00; }
.contatto dl { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem 1rem; }
.contatto dt { font-family: var(--f-mono); font-size: .58rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
.contatto dd { font-weight: 600; font-size: .92rem; }
.contatto dd.arancio { color: var(--arancio); }
.palco[data-scena="3"] .contatto dl > div { animation: cmsg .5s var(--molla) both; }
.palco[data-scena="3"] .contatto dl > div:nth-child(2) { animation-delay: .12s; }
.palco[data-scena="3"] .contatto dl > div:nth-child(3) { animation-delay: .24s; }
.palco[data-scena="3"] .contatto dl > div:nth-child(4) { animation-delay: .36s; }
.avviso-arrivo { display: flex; align-items: center; gap: .8rem; margin-top: 1rem; padding: .8rem 1rem; border-radius: 16px; background: rgba(40,41,46,.95); border: 1px solid rgba(255,255,255,.1); box-shadow: 0 20px 40px -20px rgba(0,0,0,.8); }
.palco[data-scena="3"] .avviso-arrivo { animation: arriva .7s var(--molla) .7s both; }
@keyframes arriva { from { opacity: 0; transform: translateY(-20px) scale(.95); } }
.avviso-pallino { width: 30px; height: 30px; border-radius: 8px; background: var(--sfumato); flex: 0 0 auto; }
.avviso-arrivo strong { display: block; font-size: .9rem; }
.avviso-arrivo span { font-size: .8rem; color: var(--notte-ink-2); }
.avviso-ora { margin-left: auto; font-family: var(--f-mono); font-size: .62rem !important; }

/* ── 4. CANALI ────────────────────────────────────────────────────── */
.canali { display: grid; gap: 1.4rem; }
@media (min-width: 1000px) { .canali { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 2.4rem; align-items: stretch; } }
.canali-schede { display: grid; gap: .6rem; align-content: start; }
.canali-schede button {
  position: relative; display: grid; gap: .2rem; text-align: left;
  padding: 1.1rem 1.2rem; border-radius: 16px;
  border: 1px solid rgba(255,255,255,.1); background: rgba(255,255,255,.03);
  transition: border-color .3s, background-color .3s, transform .4s var(--molla);
}
.canali-schede button b { font-size: 1.25rem; font-weight: 600; letter-spacing: -.02em; color: #fff; }
.canali-schede button span { color: var(--notte-ink-2); font-size: .9rem; }
.canali-schede button small { position: absolute; top: 1.15rem; right: 1.2rem; font-family: var(--f-mono); font-size: .58rem; letter-spacing: .12em; text-transform: uppercase; color: #77777f; }
.canali-schede button:hover { border-color: rgba(255,255,255,.25); }
.canali-schede button[aria-selected="true"] { border-color: var(--arancio); background: rgba(255,90,31,.1); transform: translateX(6px); }
.canali-schede button[aria-selected="true"] small { color: var(--arancio-2); }
.canali-vista { position: relative; min-height: 460px; border-radius: 26px; overflow: hidden; background: radial-gradient(70% 60% at 70% 30%, #2a2b30, #141518); border: 1px solid rgba(255,255,255,.08); display: grid; place-items: center; padding: 30px; }
.vista { position: absolute; inset: 30px; display: grid; place-items: center; opacity: 0; transform: translateY(20px) scale(.97); transition: opacity .5s var(--molla), transform .7s var(--molla); pointer-events: none; }
.canali[data-canale="sito"] .vista--sito, .canali[data-canale="whatsapp"] .vista--whatsapp, .canali[data-canale="email"] .vista--email { opacity: 1; transform: none; }
.canali .bolla { animation: none; }
.canali[data-canale] .vista .bolla { opacity: 0; transform: translateY(8px); transition: opacity .4s, transform .5s var(--molla); }
.canali[data-canale="sito"] .vista--sito .bolla, .canali[data-canale="whatsapp"] .vista--whatsapp .bolla, .canali[data-canale="email"] .vista--email .bolla { opacity: 1; transform: none; }
.vista .bolla:nth-child(2) { transition-delay: .35s; } .vista .bolla:nth-child(3) { transition-delay: .7s; } .vista .bolla:nth-child(4) { transition-delay: 1.05s; }

.mini-browser { width: min(100%, 560px); border-radius: 14px; overflow: hidden; background: #f5f5f7; box-shadow: 0 40px 80px -30px rgba(0,0,0,.8); }
.mini-barra { display: flex; align-items: center; gap: .8rem; padding: .55rem .8rem; background: #fff; border-bottom: 1px solid var(--riga); }
.mini-url { flex: 1; text-align: center; padding: .2rem .6rem; border-radius: 999px; background: rgba(17,17,19,.05); font-family: var(--f-mono); font-size: .64rem; color: var(--ink-3); }
.mini-pagina { position: relative; height: 320px; padding: 22px; display: flex; flex-direction: column; gap: 9px; }
.mp-titolo { width: 55%; height: 18px; border-radius: 4px; background: var(--ink); }
.mp-riga { width: 70%; height: 7px; border-radius: 4px; background: rgba(17,17,19,.12); }
.mp-riga.corta { width: 45%; }
.mp-griglia { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; width: 62%; }
.mp-griglia i { aspect-ratio: 1; border-radius: 8px; background: linear-gradient(140deg, rgba(17,17,19,.12), rgba(17,17,19,.03)); }
.mini-chat { position: absolute; right: 16px; bottom: 16px; width: 250px; display: flex; flex-direction: column; gap: .45rem; padding: .8rem; border-radius: 16px; background: #fff; box-shadow: 0 20px 40px -16px rgba(0,0,0,.35); }
.mini-chat .bolla { font-size: .8rem; }
.mini-chat .bolla--agente, .mini-posta .bolla--agente { background: #f2f2f5; color: var(--ink); border-color: transparent; }

.mini-telefono { width: 290px; border-radius: 34px; padding: 10px; background: #0b0b0d; border: 1px solid rgba(255,255,255,.14); box-shadow: 0 40px 80px -30px rgba(0,0,0,.9); }
.mt-testa { display: flex; align-items: center; gap: .6rem; padding: .8rem; border-radius: 24px 24px 8px 8px; background: #1c1d21; }
.mt-testa strong { display: block; font-size: .88rem; }
.mt-testa span { font-size: .7rem; color: #2fbf5b; }
.mt-testa .contatto-avatar { background: var(--arancio); width: 32px; height: 32px; }
.mt-corpo { display: flex; flex-direction: column; gap: .45rem; padding: .9rem .6rem 1.2rem; min-height: 300px; background: #121315; border-radius: 8px 8px 24px 24px; }
.mt-corpo .bolla { font-size: .8rem; }
.mt-corpo .bolla--cliente { background: #2b6b45; }

.mini-posta { width: min(100%, 540px); display: grid; gap: .8rem; }
.mp-mail, .mp-bozza { padding: 1.1rem 1.2rem; border-radius: 16px; background: #f5f5f7; color: var(--ink); font-size: .92rem; line-height: 1.55; }
.mp-da { display: flex; flex-direction: column; margin-bottom: .6rem; }
.mp-da span { font-size: .8rem; color: var(--ink-3); }
.mp-bozza { background: #fff; border: 1px solid rgba(255,90,31,.45); box-shadow: 0 0 0 4px rgba(255,90,31,.12); }
.mp-bozza .scena-eti { color: var(--arancio-ink); }
.canali[data-canale="email"] .mp-bozza { animation: cmsg .6s var(--molla) .3s both; }

/* ── 5. MYAGENT LAB ───────────────────────────────────────────────── */
.lab {
  display: grid; grid-template-rows: auto 1fr;
  border-radius: 20px; overflow: hidden;
  background: #fff; border: 1px solid var(--riga-2);
  box-shadow: 0 60px 120px -50px rgba(0,0,0,.45);
  min-height: 520px;
}
@media (min-width: 900px) { .lab { grid-template-columns: 240px 1fr; } .lab-barra { grid-column: 1 / -1; } }
.lab-barra { display: flex; align-items: center; gap: .9rem; padding: .7rem 1rem; background: #f5f5f7; border-bottom: 1px solid var(--riga); }
.lab-titolo { font-size: .85rem; font-weight: 600; color: var(--ink-2); }
.lab-menu { display: flex; flex-direction: column; gap: .25rem; padding: .9rem .7rem; background: #fafafb; border-right: 1px solid var(--riga); }
@media (max-width: 899px) { .lab-menu { flex-direction: row; flex-wrap: wrap; border-right: 0; border-bottom: 1px solid var(--riga); } .lab-agente { display: none !important; } }
.lab-menu button { display: flex; align-items: center; gap: .6rem; padding: .6rem .7rem; border-radius: 10px; font-size: .9rem; color: var(--ink-2); text-align: left; transition: background-color .2s, color .2s; }
.lab-menu button b { margin-left: auto; min-width: 22px; padding: .05rem .4rem; border-radius: 999px; background: var(--arancio); color: #fff; font-size: .7rem; text-align: center; }
.lab-menu button:hover { background: rgba(17,17,19,.05); color: var(--ink); }
.lab-menu button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.lab-ico { width: 18px; text-align: center; font-size: .8rem; opacity: .8; }
.lab-agente { margin-top: auto; display: flex; align-items: center; gap: .6rem; padding: .7rem; border-radius: 12px; background: #fff; border: 1px solid var(--riga); }
.lab-agente strong { display: block; font-size: .82rem; }
.lab-agente span { font-size: .72rem; color: #2fbf5b; }
.lab-agente .console-faccia { width: 38px; height: 28px; }
.lab-area { position: relative; min-height: 440px; }
.lab-pannello { position: absolute; inset: 0; display: none; }
.lab[data-vista="conversazioni"] [data-pannello="conversazioni"], .lab[data-vista="richieste"] [data-pannello="richieste"], .lab[data-vista="rapporti"] [data-pannello="rapporti"] { display: grid; animation: cmsg .45s var(--molla); }
@media (max-width: 899px) { .lab-pannello { position: relative; } }
[data-pannello="conversazioni"] { grid-template-columns: minmax(0, 250px) 1fr; }
@media (max-width: 700px) { [data-pannello="conversazioni"] { grid-template-columns: 1fr; } }
.lab-lista { border-right: 1px solid var(--riga); padding: .5rem; display: grid; align-content: start; gap: .2rem; }
.lab-lista button { width: 100%; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .6rem; padding: .6rem; border-radius: 12px; text-align: left; transition: background-color .2s; }
.lab-lista button:hover { background: rgba(17,17,19,.04); }
.lab-lista button[aria-pressed="true"] { background: rgba(255,90,31,.08); box-shadow: inset 3px 0 0 var(--arancio); }
.lab-lista strong { display: block; font-size: .88rem; }
.lab-lista small { display: block; font-size: .76rem; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lab-lista time { font-family: var(--f-mono); font-size: .62rem; color: var(--ink-3); }
.lab-lista .contatto-avatar { width: 34px; height: 34px; font-size: .68rem; }
.lab-conv { display: flex; flex-direction: column; gap: .55rem; padding: 1.2rem; overflow-y: auto; background: #fbfbfc; }
.lab-conv .bolla--agente { background: #f0f0f3; color: var(--ink); border-color: transparent; }
.lab-conv .bolla { animation: cmsg .4s var(--molla) both; }
.lab-conv .bolla:nth-child(2) { animation-delay: .08s; } .lab-conv .bolla:nth-child(3) { animation-delay: .16s; } .lab-conv .bolla:nth-child(4) { animation-delay: .24s; }
.lab-conv-nota { align-self: center; margin-top: .4rem; padding: .3rem .7rem; border-radius: 999px; background: rgba(47,191,91,.1); color: #166534; font-family: var(--f-mono); font-size: .6rem; letter-spacing: .08em; text-transform: uppercase; }
.lab-richieste { padding: 1.2rem; display: grid; gap: .6rem; align-content: start; }
.lab-richiesta { display: grid; grid-template-columns: auto 160px 1fr auto; align-items: center; gap: 1rem; padding: .9rem 1rem; border-radius: 14px; border: 1px solid var(--riga); background: #fff; font-size: .9rem; }
.lab-richiesta > span:nth-of-type(2) { color: var(--ink-2); }
.lab-richiesta .contatto-prio { margin: 0; }
@media (max-width: 700px) { .lab-richiesta { grid-template-columns: auto 1fr; } }
.lab-stato { padding: .3rem .6rem; border-radius: 999px; background: rgba(255,90,31,.12); color: var(--arancio-ink); font-size: .76rem; font-weight: 600; }
.lab-stato--ok { background: rgba(47,191,91,.12); color: #166534; }
.lab-rapporto { padding: 1.4rem 1.6rem; }
.barre { display: grid; gap: .7rem; max-width: 560px; }
.barre li { display: grid; grid-template-columns: 110px 1fr 36px; align-items: center; gap: .8rem; font-size: .88rem; }
.barre i { height: 10px; border-radius: 6px; background: var(--sfumato); transform-origin: left; transform: scaleX(var(--v)); animation: barra 1s var(--molla) both; }
@keyframes barra { from { transform: scaleX(0); } }
.barre b { font-family: var(--f-mono); font-weight: 500; font-size: .8rem; color: var(--ink-2); }
.lab-buco { max-width: 560px; padding: .9rem 1rem; border-radius: 12px; background: rgba(255,90,31,.08); border: 1px dashed rgba(255,90,31,.45); font-size: .92rem; color: var(--ink-2); }
.lab-buco b { color: var(--arancio-ink); }

/* ── 6. CALCOLATORE ───────────────────────────────────────────────── */
.calcolo { display: grid; overflow: hidden; border-radius: clamp(24px, 3vw, 36px); background: rgba(255,255,255,.9); border: 1px solid var(--riga); box-shadow: var(--om-2); }
@media (min-width: 1000px) { .calcolo { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); } }
.calcolo-testo { padding: clamp(28px, 4vw, 56px); }
.cursori { display: grid; gap: 1.5rem; margin-top: 2rem; }
.cursore { display: grid; grid-template-columns: 1fr auto; gap: .6rem 1rem; align-items: baseline; }
.cursore span { color: var(--ink-2); font-size: .95rem; }
.cursore output { font-family: var(--f-mono); font-weight: 500; font-size: 1rem; color: var(--ink); }
.cursore input { grid-column: 1 / -1; width: 100%; -webkit-appearance: none; appearance: none; height: 28px; background: transparent; cursor: pointer; }
.cursore input::-webkit-slider-runnable-track { height: 6px; border-radius: 6px; background: linear-gradient(90deg, var(--arancio) var(--pieno, 30%), rgba(17,17,19,.1) var(--pieno, 30%)); }
.cursore input::-moz-range-track { height: 6px; border-radius: 6px; background: rgba(17,17,19,.1); }
.cursore input::-moz-range-progress { height: 6px; border-radius: 6px; background: var(--arancio); }
.cursore input::-webkit-slider-thumb { -webkit-appearance: none; width: 24px; height: 24px; margin-top: -9px; border-radius: 50%; background: #fff; border: 2px solid var(--arancio); box-shadow: 0 4px 12px rgba(255,90,31,.35); transition: transform .2s; }
.cursore input::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 2px solid var(--arancio); }
.cursore input:active::-webkit-slider-thumb { transform: scale(1.15); }
.calcolo-esito { display: flex; flex-direction: column; gap: 1rem; justify-content: center; padding: clamp(28px, 4vw, 56px); color: #fff; background: #111214; background-image: radial-gradient(70% 60% at 100% 0%, rgba(255,90,31,.35), transparent 70%), linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px); background-size: auto, 24px 24px, 24px 24px; }
.esito-grande { display: flex; align-items: baseline; gap: .6rem; flex-wrap: wrap; }
.esito-grande b { font-size: clamp(4rem, 8vw, 6.4rem); font-weight: 600; letter-spacing: -.06em; line-height: .9; color: #fff; font-variant-numeric: tabular-nums; }
.esito-grande span { font-size: 1.1rem; color: var(--notte-ink-2); }
.esito-valore { font-size: 1.4rem; color: var(--notte-ink-2); }
.esito-valore b { color: var(--arancio-2); font-weight: 600; font-variant-numeric: tabular-nums; }
.esito-confronto { display: flex; justify-content: space-between; align-items: baseline; padding: .9rem 1rem; border-radius: 12px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); }
.esito-confronto span { font-family: var(--f-mono); font-size: .66rem; letter-spacing: .12em; text-transform: uppercase; color: var(--notte-ink-2); }
.esito-confronto b { font-family: var(--f-mono); font-weight: 500; }
.esito-nota { font-size: .78rem; line-height: 1.5; color: #77777f; }

/* ── 7. PIANI ─────────────────────────────────────────────────────── */
.durata { display: inline-flex; gap: .3rem; padding: .3rem; margin-bottom: 2rem; border-radius: 999px; background: #fff; border: 1px solid var(--riga-2); box-shadow: var(--om-1); }
.durata button { padding: .6rem 1.1rem; border-radius: 999px; font-size: .9rem; font-weight: 500; color: var(--ink-2); transition: background-color .25s, color .25s; }
.durata button small { margin-left: .35rem; font-family: var(--f-mono); font-size: .58rem; letter-spacing: .08em; text-transform: uppercase; color: var(--arancio); }
.durata button[aria-checked="true"] { background: var(--ink); color: #fff; }
.durata button[aria-checked="true"] small { color: var(--arancio-2); }
.piano-setup { font-family: var(--f-mono); font-size: .66rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); min-height: 1.2em; }
.piani[data-durata="mese"] .solo-anno, .piani[data-durata="anno"] .solo-mese { display: none; }
.piani[data-durata="anno"] .solo-anno { color: #1f9d55; }

/* ── 8. INSTALLAZIONE ─────────────────────────────────────────────── */
.piattaforme { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.6rem; }
.piattaforme li { padding: .45rem .8rem; border-radius: 999px; border: 1px solid rgba(255,255,255,.14); font-size: .86rem; color: var(--notte-ink-2); }
.codice { border-radius: 18px; overflow: hidden; background: #0b0b0d; border: 1px solid rgba(255,255,255,.1); box-shadow: 0 40px 80px -30px rgba(0,0,0,.8); }
.codice-testa { display: flex; align-items: center; gap: .8rem; padding: .7rem .9rem; border-bottom: 1px solid rgba(255,255,255,.08); font-family: var(--f-mono); font-size: .68rem; color: #8a8a92; }
.codice-copia { margin-left: auto; padding: .35rem .7rem; border-radius: 8px; background: rgba(255,255,255,.08); color: #fff; font-family: var(--f-mono); font-size: .66rem; letter-spacing: .08em; text-transform: uppercase; transition: background-color .2s; }
.codice-copia:hover { background: var(--arancio); }
.codice pre { margin: 0; padding: 1.4rem 1.2rem; overflow-x: auto; font-family: var(--f-mono); font-size: .86rem; line-height: 1.8; color: #e4e4e7; }
.c-gr { color: #6e6e76; } .c-tag { color: #ff8a3d; } .c-att { color: #9cc3ff; } .c-str { color: #a7e3a1; }

/* ── 9. APP ───────────────────────────────────────────────────────── */
.app-griglia { display: grid; gap: .8rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.app { display: flex; align-items: center; gap: .9rem; padding: 1.1rem 1.2rem; border-radius: 18px; background: #fff; border: 1px solid var(--riga); box-shadow: var(--om-1); transition: transform .5s var(--molla), box-shadow .5s var(--molla); }
a.app:hover { transform: translateY(-3px); box-shadow: var(--om-2); }
.app-ico { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: var(--ink); color: #fff; flex: 0 0 auto; }
.app-ico svg { width: 20px; height: 20px; }
.app-txt strong { display: block; font-size: 1rem; }
.app-txt small { font-size: .8rem; color: var(--ink-3); }
.app-stato { margin-left: auto; font-family: var(--f-mono); font-size: .62rem; letter-spacing: .12em; text-transform: uppercase; color: var(--arancio); }
.app--presto { background: rgba(255,255,255,.6); border-style: dashed; box-shadow: none; }
.app--presto .app-ico { background: #c7c7cc; }
.app--presto .app-stato { color: var(--ink-3); }

@media (prefers-reduced-motion: reduce) {
  .scena, .vista, .passaggio { transition: none; }
}

/* ── IL CONFRONTO DEI PREZZI ──────────────────────────────────────── */
.confronto { display: grid; gap: clamp(14px, 1.6vw, 22px); align-items: stretch; }
@media (min-width: 1000px) { .confronto { grid-template-columns: 1fr 1fr 1.15fr; } }
.confronto-col { display: flex; flex-direction: column; gap: 1.1rem; padding: clamp(24px, 2.6vw, 34px); border-radius: var(--r); background: rgba(255,255,255,.6); border: 1px solid var(--riga); }
.confronto-col .t-mono { color: var(--ink-3); }
.confronto-prezzo { font-size: clamp(1.6rem, 2.4vw, 2.1rem); font-weight: 600; letter-spacing: -.04em; line-height: 1.1; color: var(--ink-2); }
.confronto-prezzo small { display: block; margin-top: .3rem; font-size: .85rem; font-weight: 400; letter-spacing: 0; color: var(--ink-3); }
.confronto-col ul { display: grid; gap: .1rem; margin-bottom: auto; }
.confronto-col li { display: grid; grid-template-columns: 110px 1fr; gap: .8rem; padding: .7rem 0; border-top: 1px solid var(--riga); font-size: .93rem; }
.confronto-col li b { font-family: var(--f-mono); font-size: .62rem; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); padding-top: .2rem; }
.confronto-col li span { color: var(--ink-2); }
.confronto-col--ma { color: #fff; background: #111214; border-color: rgba(255,90,31,.5); box-shadow: 0 0 0 4px var(--arancio-velo), 0 40px 80px -30px rgba(0,0,0,.5); background-image: radial-gradient(70% 50% at 100% 0%, rgba(255,90,31,.3), transparent 70%); }
.confronto-col--ma .marchio-ma { font-size: 1.4rem; }
.confronto-col--ma .confronto-prezzo { color: #fff; font-size: clamp(2.2rem, 3.4vw, 3rem); }
.confronto-col--ma .confronto-prezzo small { color: var(--arancio-2); }
.confronto-col--ma li { border-color: rgba(255,255,255,.1); }
.confronto-col--ma li b { color: #8a8a92; }
.confronto-col--ma li span { color: #fff; font-weight: 500; }

/* telefono: MyAgent in cima al confronto, console più compatta */
@media (max-width: 999px) {
  .confronto-col--ma { order: -1; }
}
@media (max-width: 720px) {
  .ma-apertura { padding: 104px 0 56px; min-height: 0; }
  .ma-apertura::after { width: 120vmax; height: 120vmax; right: -60vmax; top: 85%; opacity: .5; }
  .console { height: min(560px, 78svh); border-radius: 22px; }
  .console-dal-vivo { white-space: nowrap; }
  .cmsg { font-size: .92rem; }
  .ma-numeri { gap: 1.4rem 1rem; }
  .canali-vista { min-height: 400px; padding: 16px; }
  .vista { inset: 16px; }
  .mini-chat { width: 210px; right: 10px; bottom: 10px; }
  .mini-pagina { height: 300px; }
  .lab-area { min-height: 0; }
  .calcolo-testo, .calcolo-esito { padding: 24px; }
  .cursore span { font-size: .9rem; }
  .durata { display: flex; width: 100%; }
  .durata button { flex: 1; }
}


/* ── PROVALO SUL TUO SITO ─────────────────────────────────────────── */
.prova { display: grid; gap: clamp(32px, 4vw, 64px); align-items: start; }
@media (min-width: 1000px) { .prova { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; } }
.prova-testo { display: flex; flex-direction: column; gap: 1.4rem; }
.prova-form {
  display: flex; align-items: center; gap: .4rem; padding: 6px 6px 6px 18px;
  border-radius: 999px; background: #fff; border: 1px solid var(--riga);
  box-shadow: var(--om-1); transition: border-color .25s, box-shadow .25s;
}
.prova-form:focus-within { border-color: var(--arancio); box-shadow: 0 0 0 5px var(--arancio-velo), var(--om-1); }
.prova-proto { font-family: var(--f-mono); font-size: .8rem; color: var(--ink-3); }
.prova-form input { flex: 1; min-width: 0; padding: .8rem .2rem; border: 0; background: none; font: inherit; font-size: 1.05rem; color: var(--ink); outline: none; }
.prova-form .btn { flex: 0 0 auto; }
.prova.legge .prova-form .btn { opacity: .6; pointer-events: none; }
.prova-errore { padding: .8rem 1rem; border-radius: 12px; background: rgba(255,90,31,.08); border: 1px solid rgba(255,90,31,.3); color: var(--ink-2); font-size: .93rem; }
.prova-lettura { display: grid; gap: .35rem; padding: 1rem 1.1rem; border-radius: 16px; background: rgba(255,255,255,.7); border: 1px solid var(--riga); font-family: var(--f-mono); font-size: .74rem; letter-spacing: .02em; color: var(--ink-2); max-height: 260px; overflow: auto; }
.prova-lettura li { display: flex; align-items: center; gap: .6rem; animation: cmsg .4s var(--molla) both; }
.prova-lettura li i { width: 14px; height: 14px; flex: 0 0 auto; border-radius: 50%; border: 1.5px solid var(--riga-forte, #c9c9cf); }
.prova-lettura li.ora i { border-color: var(--arancio); border-right-color: transparent; animation: gira .8s linear infinite; }
.prova-lettura li.fatto i { border-color: #2fbf5b; background: #2fbf5b url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M3.5 7.2l2.2 2.2 4.8-4.8' fill='none' stroke='%23fff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 100%; }
.prova-lettura li.titolo { color: var(--ink); font-weight: 500; text-transform: uppercase; letter-spacing: .12em; font-size: .66rem; }
.prova-lettura li.titolo i { display: none; }
@keyframes gira { to { transform: rotate(360deg); } }
.prova-nota { color: var(--ink-3); font-size: .62rem; }

.prova-console { height: min(600px, 76vh); }
.prova-console .faccina { flex: 0 0 auto; }
.prova-vuota { margin: auto; max-width: 280px; display: grid; justify-items: center; gap: .8rem; text-align: center; color: var(--notte-ink-2); font-size: .95rem; line-height: 1.5; }
.prova-vuota b { color: var(--arancio-2); font-weight: 500; }
.prova-vuota-ico { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; border: 1px dashed rgba(255,255,255,.25); color: var(--arancio-2); font-size: 1.2rem; }
@media (max-width: 999px) { .prova-vuota-ico { transform: rotate(45deg); } }
.prova.legge .prova-vuota { opacity: .4; }
.prova-fine { padding: 1rem 1.1rem 1.1rem; border-top: 1px solid rgba(255,255,255,.08); background: linear-gradient(180deg, rgba(255,90,31,.08), rgba(255,90,31,.16)); display: grid; gap: .8rem; animation: cmsg .5s var(--molla) both; }
.prova-fine p { font-size: .92rem; color: var(--notte-ink); }
.prova-fine strong { color: #fff; }
.prova-console.attesa .console-form { opacity: .5; pointer-events: none; }

@media (max-width: 720px) {
  .prova-form { flex-wrap: wrap; border-radius: 22px; padding: 8px 8px 8px 16px; }
  .prova-form .btn { width: 100%; justify-content: center; }
  .prova-console { height: min(560px, 80svh); border-radius: 22px; }
}
.prova [hidden] { display: none !important; }
