/* ══════════════════════════════════════════════════════════════════════
   Ippocrate — finestre di prodotto ricostruite in HTML/CSS.
   Nessuno screenshot: tutto vettoriale, nitido a ogni densità,
   e nessun dato di pazienti reali sul sito pubblico.
   ══════════════════════════════════════════════════════════════════════ */

/* ── Cornice della finestra ────────────────────────────────────────── */
.mock {
    position: relative;
    background: #fff;
    border-radius: var(--r-lg);
    box-shadow: var(--sh-lg);
    overflow: hidden;
    border: 1px solid rgba(15, 23, 42, .08);
    font-size: .8rem;
    line-height: 1.4;
    color: var(--text);
}
.mock--float { animation: galleggia 7s ease-in-out infinite; }
@keyframes galleggia {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-10px); }
}
@media (prefers-reduced-motion: reduce) {
    .mock--float { animation: none; }
}

.mock__bar {
    display: flex; align-items: center; gap: .5rem;
    padding: .6rem .9rem;
    background: #f8fafc;
    border-bottom: 1px solid var(--line);
}
.mock__dots { display: flex; gap: .3rem; }
.mock__dots i { width: 9px; height: 9px; border-radius: 50%; background: #e2e8f0; }
.mock__dots i:first-child { background: #fca5a5; }
.mock__dots i:nth-child(2) { background: #fcd34d; }
.mock__dots i:nth-child(3) { background: #86efac; }
.mock__title {
    margin-left: .4rem;
    font-size: .74rem; font-weight: 700; color: var(--muted);
    display: flex; align-items: center; gap: .35rem;
}
.mock__title .ico { color: var(--cyan); }
.mock__body { padding: 1rem; }

/* Intestazione interna con titolo e azioni finte */
.mock__head {
    display: flex; align-items: center; gap: .6rem;
    padding: .75rem 1rem;
    border-bottom: 1px solid var(--line-soft);
}
.mock__head strong { font-size: .88rem; color: var(--ink); letter-spacing: -.01em; }
.mock__chip {
    margin-left: auto;
    padding: .2rem .55rem;
    border-radius: var(--r-pill);
    font-size: .68rem; font-weight: 800;
    background: var(--cyan-soft); color: var(--blue-deep);
}

/* ── Agenda ────────────────────────────────────────────────────────── */
.ag { display: grid; grid-template-columns: 44px repeat(3, 1fr); position: relative; }
.ag__col-h {
    padding: .45rem .3rem; text-align: center;
    font-size: .66rem; font-weight: 800; letter-spacing: .04em;
    color: var(--muted); text-transform: uppercase;
    border-bottom: 1px solid var(--line);
}
.ag__ora {
    padding: .3rem .4rem 0 0; text-align: right;
    font-size: .62rem; color: var(--light); font-weight: 700;
    border-right: 1px solid var(--line-soft);
    height: 34px;
}
.ag__cell { height: 34px; border-bottom: 1px dashed var(--line-soft); border-right: 1px solid var(--line-soft); position: relative; }
.ag__ev {
    position: absolute; inset: 2px 3px;
    border-radius: 7px;
    padding: .22rem .4rem;
    font-size: .64rem; font-weight: 700;
    color: #fff;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(15, 23, 42, .12);
    animation: entraEvento .5s var(--ease-out) both;
}
.ag__ev span { display: block; font-weight: 600; opacity: .85; font-size: .58rem; }
.ag__ev--igiene   { background: linear-gradient(135deg, #38bdf8, #0284c7); }
.ag__ev--conserv  { background: linear-gradient(135deg, #34d399, #059669); }
.ag__ev--protesi  { background: linear-gradient(135deg, #a78bfa, #7c3aed); }
.ag__ev--visita   { background: linear-gradient(135deg, #fbbf24, #d97706); }
.ag__ev--ortho    { background: linear-gradient(135deg, #f472b6, #db2777); }
.ag__ev--tall     { height: calc(200% - 4px); }
@keyframes entraEvento {
    from { opacity: 0; transform: translateY(-6px) scale(.96); }
    to   { opacity: 1; transform: none; }
}
.ag__ev[data-ritardo="1"] { animation-delay: .12s; }
.ag__ev[data-ritardo="2"] { animation-delay: .24s; }
.ag__ev[data-ritardo="3"] { animation-delay: .36s; }
.ag__ev[data-ritardo="4"] { animation-delay: .48s; }
.ag__ev[data-ritardo="5"] { animation-delay: .60s; }

/* Linea rossa dell'ora corrente, come nell'agenda vera */
.ag__adesso {
    position: absolute; left: 44px; right: 0;
    height: 2px; background: #ef4444;
    z-index: 3; pointer-events: none;
}
.ag__adesso::before {
    content: ''; position: absolute; left: -4px; top: -3px;
    width: 8px; height: 8px; border-radius: 50%; background: #ef4444;
}

/* ── Odontogramma ──────────────────────────────────────────────────── */
.odo { padding: 1rem; }
.odo__arcata { display: flex; justify-content: center; gap: 3px; margin-bottom: .5rem; }
.odo__dente {
    width: 26px;
    display: grid; justify-items: center; gap: 2px;
    cursor: pointer;
    background: none;
    border-radius: 6px;
    padding: 2px 0;
    transition: background var(--t-fast);
}
.odo__dente:hover { background: var(--cyan-soft); }
.odo__dente svg { width: 20px; height: 26px; }
.odo__dente .num { font-size: .56rem; font-weight: 800; color: var(--light); }
.odo__dente[aria-pressed="true"] { background: rgba(41, 171, 226, .16); }
.odo__dente[aria-pressed="true"] .num { color: var(--blue-deep); }

.dente-corona { fill: #fff; stroke: #cbd5e1; stroke-width: 1.4; transition: fill var(--t), stroke var(--t); }
.odo__dente[data-stato="sano"]      .dente-corona { fill: #ffffff; }
.odo__dente[data-stato="otturato"]  .dente-corona { fill: #93c5fd; stroke: #2563eb; }
.odo__dente[data-stato="carie"]     .dente-corona { fill: #fca5a5; stroke: #dc2626; }
.odo__dente[data-stato="corona"]    .dente-corona { fill: #fcd34d; stroke: #d97706; }
.odo__dente[data-stato="impianto"]  .dente-corona { fill: #c4b5fd; stroke: #7c3aed; }
.odo__dente[data-stato="mancante"]  .dente-corona { fill: #f1f5f9; stroke: #cbd5e1; stroke-dasharray: 3 2; }
.odo__dente[data-stato="dafare"]    .dente-corona { fill: #fff; stroke: #f97316; stroke-width: 2; stroke-dasharray: 3 2; }

.odo__legenda {
    display: flex; flex-wrap: wrap; gap: .5rem .9rem;
    margin-top: .8rem; padding-top: .75rem;
    border-top: 1px solid var(--line-soft);
    font-size: .68rem; color: var(--muted); font-weight: 600;
}
.odo__legenda span { display: inline-flex; align-items: center; gap: .3rem; }
.odo__legenda i { width: 11px; height: 11px; border-radius: 3px; border: 1.4px solid; }

.odo__pannello {
    margin-top: .8rem;
    padding: .75rem .9rem;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: var(--r);
    font-size: .74rem;
    min-height: 76px;
}
.odo__pannello strong { display: block; color: var(--ink); font-size: .84rem; margin-bottom: .2rem; }
.odo__pannello .muted { color: var(--muted); }

/* ── Conferma via messaggio ────────────────────────────────────────── */
.chat { padding: 1rem; background: #eef4f2; }
.chat__bolla {
    max-width: 88%;
    padding: .55rem .75rem;
    border-radius: 12px;
    font-size: .74rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .08);
    margin-bottom: .5rem;
    animation: entraBolla .45s var(--ease-out) both;
}
.chat__bolla--in  { background: #fff; border-top-left-radius: 3px; }
.chat__bolla--out { background: #d9fdd3; margin-left: auto; border-top-right-radius: 3px; }
.chat__bolla time { display: block; font-size: .6rem; color: var(--light); margin-top: .2rem; text-align: right; }
.chat__bolla[data-ritardo="1"] { animation-delay: .5s; }
.chat__bolla[data-ritardo="2"] { animation-delay: 1.1s; }
@keyframes entraBolla {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: none; }
}
.chat__azioni { display: flex; gap: .4rem; margin-top: .35rem; }
.chat__azioni b {
    flex: 1; text-align: center;
    padding: .35rem; border-radius: 8px;
    background: #f0f9ff; color: #0369a1;
    font-size: .68rem; font-weight: 800;
    border: 1px solid #bae6fd;
}
.chat__azioni b.sel { background: #dcfce7; color: #15803d; border-color: #86efac; }

/* ── Documento (preventivo / fattura) ──────────────────────────────── */
.doc { padding: 1rem 1.1rem; }
.doc__riga {
    display: grid; grid-template-columns: 1fr auto;
    gap: .5rem; padding: .42rem 0;
    border-bottom: 1px dashed var(--line-soft);
    font-size: .74rem;
    animation: entraRiga .4s var(--ease-out) both;
}
.doc__riga b { font-weight: 700; color: var(--ink); }
.doc__riga span { color: var(--muted); font-size: .68rem; display: block; }
.doc__riga em { font-style: normal; font-weight: 800; color: var(--ink); }
.doc__riga[data-ritardo="1"] { animation-delay: .15s; }
.doc__riga[data-ritardo="2"] { animation-delay: .3s; }
.doc__riga[data-ritardo="3"] { animation-delay: .45s; }
@keyframes entraRiga {
    from { opacity: 0; transform: translateX(-8px); }
    to   { opacity: 1; transform: none; }
}
.doc__tot {
    display: flex; justify-content: space-between; align-items: baseline;
    margin-top: .6rem; padding-top: .6rem;
    border-top: 2px solid var(--ink);
    font-size: .78rem; font-weight: 800; color: var(--ink);
}
.doc__tot em { font-style: normal; font-size: 1.15rem; letter-spacing: -.02em; }

.timbro {
    display: inline-flex; align-items: center; gap: .35rem;
    margin-top: .8rem;
    padding: .35rem .7rem;
    border-radius: var(--r-pill);
    font-size: .68rem; font-weight: 800;
    background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0;
    animation: timbra .5s var(--ease-out) .9s both;
}
@keyframes timbra {
    0%   { opacity: 0; transform: scale(1.6) rotate(-8deg); }
    100% { opacity: 1; transform: none; }
}

/* ── Magazzino ─────────────────────────────────────────────────────── */
.mag__item {
    display: flex; align-items: center; gap: .7rem;
    padding: .6rem .3rem;
    border-bottom: 1px solid var(--line-soft);
    font-size: .76rem;
}
.mag__ico {
    display: grid; place-items: center;
    width: 32px; height: 32px; flex: none;
    border-radius: 9px; background: var(--cyan-soft); color: var(--blue-deep);
}
.mag__item b { color: var(--ink); font-weight: 700; }
.mag__item span { display: block; font-size: .66rem; color: var(--muted); }
.mag__q {
    margin-left: auto; text-align: right;
    font-weight: 800; color: var(--ink); font-size: .9rem;
    font-variant-numeric: tabular-nums;
}
.mag__q small { display: block; font-size: .6rem; font-weight: 700; }
.mag__q--basso { color: #dc2626; }
.mag__q--basso small { color: #dc2626; }

.scan {
    position: relative;
    margin: .6rem 0 .9rem;
    height: 96px;
    border-radius: var(--r);
    background: #0f172a;
    overflow: hidden;
    display: grid; place-items: center;
}
.scan__linee { display: flex; gap: 3px; align-items: flex-end; height: 46px; }
.scan__linee i { width: 3px; background: #fff; border-radius: 1px; }
.scan__laser {
    position: absolute; left: 8%; right: 8%; height: 2px;
    background: #ef4444; box-shadow: 0 0 12px 2px rgba(239, 68, 68, .8);
    animation: scansiona 2.2s ease-in-out infinite;
}
@keyframes scansiona {
    0%, 100% { top: 18%; }
    50%      { top: 78%; }
}
@media (prefers-reduced-motion: reduce) {
    .scan__laser { animation: none; top: 50%; }
}

/* ── Assistente ────────────────────────────────────────────────────── */
.ai__testata {
    display: flex; align-items: center; gap: .6rem;
    padding: .8rem 1rem;
    background: var(--grad-soft); color: #fff;
}
.ai__testata .ico { font-size: 1.2rem; }
.ai__testata b { font-size: .86rem; }
.ai__testata small { display: block; font-size: .66rem; opacity: .85; }
.ai__corpo { padding: 1rem; }
.ai__testo {
    font-size: .78rem; line-height: 1.65; color: var(--text);
    min-height: 5.4em;
}
.ai__cursore {
    display: inline-block; width: 2px; height: 1em;
    background: var(--cyan); vertical-align: -.15em;
    animation: lampeggia 1s step-end infinite;
}
@keyframes lampeggia { 50% { opacity: 0; } }
.ai__suggerimenti { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .8rem; }
.ai__suggerimenti b {
    padding: .3rem .6rem; border-radius: var(--r-pill);
    background: var(--bg); border: 1px solid var(--line);
    font-size: .68rem; font-weight: 700; color: var(--muted);
}

/* ── Telefono ──────────────────────────────────────────────────────── */
.fon {
    width: 232px;
    padding: 9px;
    border-radius: 34px;
    background: linear-gradient(160deg, #1e293b, #0f172a);
    box-shadow: var(--sh-lg), inset 0 0 0 1px rgba(255, 255, 255, .1);
}
.fon__schermo {
    position: relative;
    border-radius: 26px;
    background: #fff;
    overflow: hidden;
    aspect-ratio: 9 / 18.5;
}
.fon__notch {
    position: absolute; top: 8px; left: 50%; translate: -50% 0;
    width: 64px; height: 17px; border-radius: 10px; background: #0f172a; z-index: 4;
}
