/*
 * Tema del pannello Carrozzeria Tiglio, con i colori e i caratteri del sito.
 * CSS semplice caricato dopo quello di Filament (render hook STYLES_AFTER): nessuna build.
 * Classi Filament: fi-*. Classi del tema: tg-*.
 */
:root {
  --tg-navy: #1a1f2f;
  --tg-navy-2: #232a3d;
  --tg-navy-3: #13161f;
  --tg-red: #e5322e;
  --tg-red-2: #c92622;
  --tg-cream: #f5f3f0;
  --tg-white: #f8f8f8;
  --tg-line: rgba(26, 31, 47, .1);
  --tg-muted: #5b6273;
  --tg-ease: cubic-bezier(.2, .7, .2, 1);
  --tg-sidebar-w: 18rem;
}

/* ---------- base ---------- */
.fi-body { background: var(--tg-cream); color: var(--tg-navy); }
.fi-header-heading, .fi-section-header-heading, .fi-ta-header-heading, .fi-simple-header-heading,
.fi-modal-heading, .tg-hero-title, .tg-panel-title, .tg-auth-title {
  font-family: Roboto, Outfit, system-ui, sans-serif; font-weight: 800; letter-spacing: -.025em;
}
.fi-header-heading { font-size: 2rem; line-height: 1.1; }
.tg-kicker { font-size: .72rem; letter-spacing: .22em; text-transform: uppercase; color: var(--tg-red); font-weight: 500; }

/* logo: bianco sul blu, rosso sul chiaro */
.tg-logo { height: 100%; width: auto; }
.tg-logo-r { display: none; }
.fi-simple-header .tg-logo-w, .fi-topbar .tg-logo-w { display: none; }
.fi-simple-header .tg-logo-r, .fi-topbar .tg-logo-r { display: block; }

/* ---------- menu laterale ---------- */
.fi-sidebar {
  background: var(--tg-navy) !important;
  background-image: radial-gradient(420px circle at 0% 0%, rgba(229, 50, 46, .22), transparent 60%),
                    radial-gradient(300px circle at 110% 100%, rgba(229, 50, 46, .12), transparent 60%) !important;
  color: #fff;
  box-shadow: 1px 0 0 rgba(255, 255, 255, .04);
}
.fi-sidebar-header { background: transparent !important; box-shadow: none !important; border: 0 !important; padding-block: 1.4rem; }
.fi-sidebar-header .tg-logo-w { display: block; } .fi-sidebar-header .tg-logo-r { display: none; }
.fi-sidebar-nav { padding-top: .5rem; }
.fi-sidebar-group-label { color: rgba(255, 255, 255, .45) !important; font-size: .7rem; letter-spacing: .18em; text-transform: uppercase; font-weight: 500; }
.fi-sidebar-group-collapse-btn, .fi-sidebar-group-btn .fi-icon { color: rgba(255, 255, 255, .45) !important; }
.fi-sidebar-item-btn {
  position: relative; border-radius: .9rem; padding-block: .62rem;
  transition: background .3s var(--tg-ease), transform .3s var(--tg-ease);
}
.fi-sidebar-item-btn > .fi-icon { color: rgba(255, 255, 255, .55) !important; transition: color .3s; }
.fi-sidebar-item-label { color: rgba(255, 255, 255, .82) !important; font-weight: 400; }
.fi-sidebar-item-btn:hover { background: rgba(255, 255, 255, .06) !important; transform: translateX(3px); }
.fi-sidebar-item-btn:hover > .fi-icon { color: #fff !important; }
.fi-sidebar-item.fi-active > .fi-sidebar-item-btn {
  background: linear-gradient(90deg, rgba(229, 50, 46, .95), rgba(229, 50, 46, .75)) !important;
  box-shadow: 0 10px 24px rgba(229, 50, 46, .35);
}
.fi-sidebar-item.fi-active > .fi-sidebar-item-btn > .fi-icon,
.fi-sidebar-item.fi-active > .fi-sidebar-item-btn > .fi-sidebar-item-label { color: #fff !important; font-weight: 500; }
.fi-sidebar-item-grouped-border-part { background: rgba(255, 255, 255, .15) !important; }
.fi-sidebar-item-badge-ctn .fi-badge { background: #fff; color: var(--tg-red); }
.fi-sidebar-footer { border-top: 1px solid rgba(255, 255, 255, .08); }
.fi-sidebar .fi-icon-btn { color: rgba(255, 255, 255, .7); }

/* ---------- barra in alto ---------- */
.fi-topbar { background: rgba(245, 243, 240, .82) !important; backdrop-filter: blur(14px); box-shadow: 0 1px 0 var(--tg-line) !important; }
.fi-topbar-ctn { box-shadow: none; }
/* Su desktop la parte sinistra della barra (logo e pulsante del menu) prosegue il blu della sidebar fino in cima. */
@media (min-width: 64rem) {
  .fi-topbar-start {
    align-self: stretch; box-sizing: border-box; width: var(--sidebar-width); margin-inline: -1rem 0; padding-inline: 1rem;
    background: var(--tg-navy); background-image: radial-gradient(420px circle at 0% 0%, rgba(229, 50, 46, .22), transparent 60%);
  }
  .fi-topbar-start .tg-logo-w { display: block; } .fi-topbar-start .tg-logo-r { display: none; }
  .fi-topbar-start .fi-icon-btn { color: rgba(255, 255, 255, .75); }
  .fi-topbar-start .fi-icon-btn:hover { color: #fff; background: rgba(255, 255, 255, .08); }
  /* Sidebar ridotta: la parte blu segue la larghezza ridotta. */
  .fi-body:has(.fi-sidebar:not(.fi-sidebar-open)) .fi-topbar-start { width: var(--collapsed-sidebar-width, 4.5rem); }
  .fi-body:has(.fi-sidebar:not(.fi-sidebar-open)) .fi-topbar-start .fi-logo { display: none; }
}
.fi-user-menu-trigger .fi-avatar { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--tg-red); }

/* ---------- contenuti ---------- */
.fi-section, .fi-ta-ctn, .fi-wi-stats-overview-stat {
  border-radius: 1.4rem !important; border: 1px solid var(--tg-line) !important;
  box-shadow: 0 1px 2px rgba(26, 31, 47, .04), 0 18px 40px -24px rgba(26, 31, 47, .18) !important;
  background: #fff;
}
.fi-ta-header-cell { background: #fbfaf8; font-size: .78rem; letter-spacing: .04em; text-transform: uppercase; color: var(--tg-muted); }
.fi-btn { border-radius: 999px !important; font-weight: 500; transition: transform .25s var(--tg-ease), box-shadow .25s; }
.fi-btn:hover { transform: translateY(-1px); }
/* rosso Tiglio pieno: la palette che Filament ricava dal colore e' piu' spenta del rosso del sito */
.fi-btn.fi-color-primary:not(.fi-outlined):not(.fi-link) { background: var(--tg-red) !important; color: #fff !important; box-shadow: 0 10px 22px -10px rgba(229, 50, 46, .8); }
.fi-btn.fi-color-primary:not(.fi-outlined):not(.fi-link):hover { background: var(--tg-red-2) !important; }
.fi-btn.fi-color-primary:not(.fi-outlined):not(.fi-link) .fi-icon { color: #fff !important; }
.fi-input-wrp { border-radius: .9rem !important; }
.fi-tabs { border-radius: 999px !important; }
.fi-modal-window { border-radius: 1.6rem !important; }
.fi-breadcrumbs { font-size: .8rem; }

/* ---------- dashboard: benvenuto ---------- */
.tg-widget { height: 100%; }
.tg-hero {
  position: relative; overflow: hidden; isolation: isolate; border-radius: 1.8rem; color: #fff;
  padding: 2.6rem 2.8rem; min-height: 15rem; display: flex; align-items: flex-end;
  background: var(--tg-navy-3) url(../images/admin/sfondo-black.jpg) center / cover no-repeat;
  box-shadow: 0 30px 60px -30px rgba(19, 22, 31, .7);
  animation: tg-rise .8s var(--tg-ease) both;
}
.tg-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(19, 22, 31, .92) 0%, rgba(19, 22, 31, .55) 55%, rgba(19, 22, 31, .2) 100%); }
.tg-hero-glow { position: absolute; z-index: -1; width: 34rem; height: 34rem; right: -8rem; top: -14rem; border-radius: 50%;
  background: radial-gradient(circle, rgba(229, 50, 46, .55), transparent 65%); filter: blur(10px); animation: tg-float 9s ease-in-out infinite; }
.tg-hero-word { position: absolute; right: -1rem; bottom: -3.2rem; z-index: -1; font-family: 'Lexend Exa', Outfit, sans-serif; font-weight: 200;
  font-size: 12rem; line-height: 1; letter-spacing: -.05em; color: transparent; -webkit-text-stroke: 1px rgba(255, 255, 255, .14); pointer-events: none; }
.tg-hero-body { max-width: 44rem; }
.tg-hero .tg-kicker { color: #ff8a87; }
.tg-hero-title { font-size: 2.6rem; line-height: 1.05; margin: .5rem 0 .7rem; }
.tg-hero-lead { font-size: 1.05rem; color: rgba(255, 255, 255, .82); }
.tg-hero-lead strong { color: #fff; font-weight: 500; }
.tg-hero-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.6rem; }
.tg-btn { display: inline-flex; align-items: center; gap: .5rem; border-radius: 999px; padding: .7rem 1.2rem; font-size: .92rem; font-weight: 500;
  transition: transform .3s var(--tg-ease), background .3s, box-shadow .3s; }
.tg-btn-ic { width: 1.15rem; height: 1.15rem; }
.tg-btn-red { background: var(--tg-red); color: #fff; box-shadow: 0 12px 26px -10px rgba(229, 50, 46, .9); }
.tg-btn-red:hover { background: var(--tg-red-2); transform: translateY(-2px); }
.tg-btn-glass { background: rgba(255, 255, 255, .1); color: #fff; border: 1px solid rgba(255, 255, 255, .2); backdrop-filter: blur(8px); }
.tg-btn-glass:hover { background: #fff; color: var(--tg-navy); transform: translateY(-2px); }

/* ---------- dashboard: card ornamentali ---------- */
.tg-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.1rem; }
.tg-card {
  position: relative; overflow: hidden; isolation: isolate; display: flex; flex-direction: column; min-height: 12.5rem;
  border-radius: 1.6rem; padding: 1.4rem 1.5rem 1.3rem; border: 1px solid var(--tg-line);
  transition: transform .45s var(--tg-ease), box-shadow .45s var(--tg-ease);
  animation: tg-rise .8s var(--tg-ease) both; animation-delay: calc(.08s + var(--i) * .08s);
}
.tg-card:hover { transform: translateY(-6px); box-shadow: 0 26px 50px -24px rgba(26, 31, 47, .45); }
.tg-card-orn { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
/* anelli concentrici e reticolo: il decoro di ogni card */
.tg-card-orn::before { content: ""; position: absolute; width: 15rem; height: 15rem; right: -5rem; top: -5rem; border-radius: 50%;
  background: repeating-radial-gradient(circle, transparent 0 14px, currentColor 14px 15px); opacity: .13; transition: transform .8s var(--tg-ease); }
.tg-card-orn::after { content: ""; position: absolute; inset: auto 0 0 0; height: 55%;
  background-image: radial-gradient(currentColor 1px, transparent 1.4px); background-size: 14px 14px; opacity: .08;
  mask-image: linear-gradient(0deg, #000, transparent); }
.tg-card:hover .tg-card-orn::before { transform: scale(1.15) rotate(20deg); }
.tg-card-top { display: flex; justify-content: space-between; align-items: center; }
.tg-card-ic { width: 2.8rem; height: 2.8rem; border-radius: 1rem; display: grid; place-items: center; }
.tg-card-ic .fi-icon, .tg-card-ic svg { width: 1.4rem; height: 1.4rem; }
.tg-card-arrow { width: 2.2rem; height: 2.2rem; border-radius: 50%; display: grid; place-items: center; border: 1px solid currentColor; opacity: .5;
  transition: transform .4s var(--tg-ease), opacity .3s; }
.tg-card:hover .tg-card-arrow { transform: rotate(-45deg); opacity: 1; }
.tg-card-value { font-family: 'Lexend Exa', Outfit, sans-serif; font-weight: 300; font-size: 3.2rem; line-height: 1; letter-spacing: -.05em; margin-top: auto; padding-top: 1.2rem; }
.tg-card-label { font-weight: 500; font-size: 1rem; margin-top: .4rem; }
.tg-card-hint { font-size: .82rem; opacity: .65; }
.tg-card-red { background: linear-gradient(140deg, #ef4a45 0%, var(--tg-red) 45%, #b81f1b 100%); color: #fff; border-color: transparent; }
.tg-card-red .tg-card-ic { background: rgba(255, 255, 255, .18); }
.tg-card-navy { background: linear-gradient(150deg, var(--tg-navy-2), var(--tg-navy) 60%, var(--tg-navy-3)); color: #fff; border-color: transparent; }
.tg-card-navy .tg-card-ic { background: rgba(229, 50, 46, .9); }
.tg-card-navy .tg-card-orn::before { color: var(--tg-red); opacity: .28; }
.tg-card-cream { background: #fff url(../images/admin/sfondo-black.jpg) center / cover; color: #fff; border-color: transparent; }
.tg-card-cream::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(160deg, rgba(19, 22, 31, .55), rgba(19, 22, 31, .9)); }
.tg-card-cream .tg-card-ic { background: #fff; color: var(--tg-navy); }
.tg-card-white { background: #fff; color: var(--tg-navy); }
.tg-card-white .tg-card-ic { background: rgba(229, 50, 46, .1); color: var(--tg-red); }
.tg-card-white .tg-card-orn::before { color: var(--tg-red); opacity: .1; }
.tg-spark { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 4.2rem; z-index: -1; }
.tg-spark-line { fill: none; stroke: var(--tg-red); stroke-width: 1.6; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.tg-spark-area { fill: rgba(229, 50, 46, .08); stroke: none; }

/* ---------- dashboard: pannelli agenda e richieste ---------- */
.tg-panel { position: relative; overflow: hidden; height: 100%; background: #fff; border-radius: 1.6rem; border: 1px solid var(--tg-line);
  padding: 1.5rem 1.6rem; box-shadow: 0 18px 40px -26px rgba(26, 31, 47, .25); animation: tg-rise .8s .3s var(--tg-ease) both; }
.tg-panel::after { content: ""; position: absolute; right: -3rem; top: -3rem; width: 9rem; height: 9rem; border-radius: 50%;
  background: repeating-radial-gradient(circle, transparent 0 10px, rgba(229, 50, 46, .1) 10px 11px); pointer-events: none; }
.tg-panel-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; margin-bottom: 1rem; }
.tg-panel-title { font-size: 1.45rem; line-height: 1.1; margin-top: .25rem; }
.tg-link { font-size: .85rem; color: var(--tg-red); font-weight: 500; white-space: nowrap; position: relative; z-index: 1; }
.tg-link:hover { text-decoration: underline; }
.tg-row { display: flex; align-items: center; gap: .9rem; padding: .8rem .6rem; border-top: 1px solid var(--tg-line); border-radius: .9rem; transition: background .25s, transform .3s var(--tg-ease); }
.tg-row:first-of-type { border-top: 0; }
.tg-row-link:hover { background: var(--tg-cream); transform: translateX(4px); }
.tg-row-main { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.tg-row-main b { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tg-row-main small { font-size: .8rem; color: var(--tg-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tg-time { font-family: 'Lexend Exa', Outfit, sans-serif; font-weight: 300; font-size: 1.15rem; min-width: 3.6rem; color: var(--tg-navy); }
.tg-avatar { width: 2.5rem; height: 2.5rem; flex: none; border-radius: .9rem; display: grid; place-items: center; font-weight: 600; color: #fff; background: var(--tg-navy); }
.tg-type-sinistro { background: var(--tg-red); } .tg-type-informazioni { background: #8a909c; }
.tg-chip { font-size: .74rem; padding: .3rem .7rem; border-radius: 999px; background: var(--tg-cream); color: var(--tg-navy); white-space: nowrap; }
.tg-status-nuova { background: rgba(229, 50, 46, .12); color: var(--tg-red-2); }
.tg-status-in_lavorazione { background: rgba(26, 31, 47, .08); }
.tg-empty { display: flex; flex-direction: column; align-items: center; gap: .5rem; padding: 2rem 0; color: var(--tg-muted); }
.tg-empty-ic { width: 2rem; height: 2rem; color: var(--tg-red); }

/* ---------- riquadro Test (solo sviluppo) ---------- */
.tg-tests-run { position: relative; z-index: 1; border: 0; cursor: pointer; }
.tg-tests-run:disabled { opacity: .55; cursor: progress; transform: none; box-shadow: none; }
.tg-tests-outcome { display: flex; flex-wrap: wrap; align-items: baseline; gap: .4rem 1rem; padding: .9rem 1.1rem; border-radius: 1rem; margin-bottom: .8rem; }
.tg-tests-outcome strong { font-size: 1.05rem; font-weight: 600; }
.tg-tests-outcome small { font-size: .8rem; color: var(--tg-muted); }
.tg-tests-outcome.tg-tests-passed { background: rgba(31, 138, 76, .1); color: #17663a; }
.tg-tests-outcome.tg-tests-failed { background: rgba(229, 50, 46, .1); color: var(--tg-red-2); }
.tg-tests-outcome.tg-tests-running { background: var(--tg-cream); color: var(--tg-navy); }
.tg-tests-phases { list-style: none; margin: 0; padding: 0; }
.tg-tests-phase { padding: .75rem .6rem; border-top: 1px solid var(--tg-line); }
.tg-tests-phase:first-child { border-top: 0; }
.tg-tests-phase-head { display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; }
.tg-tests-phase-head b { font-weight: 500; flex: 1; min-width: 10rem; }
.tg-tests-dot { width: .7rem; height: .7rem; border-radius: 50%; flex: none; background: #c9ccd3; }
.tg-tests-passed .tg-tests-dot { background: #1f8a4c; }
.tg-tests-failed .tg-tests-dot, .tg-tests-interrupted .tg-tests-dot { background: var(--tg-red); }
.tg-tests-running .tg-tests-dot { background: var(--tg-navy); animation: tg-tests-pulse 1s ease-in-out infinite; }
.tg-tests-failed .tg-tests-chip { background: rgba(229, 50, 46, .12); color: var(--tg-red-2); }
.tg-tests-passed .tg-tests-chip { background: rgba(31, 138, 76, .12); color: #17663a; }
.tg-tests-duration { font-size: .8rem; color: var(--tg-muted); min-width: 4.5rem; text-align: right; }
.tg-tests-failures { list-style: none; margin: .6rem 0 0 1.4rem; padding: 0; display: grid; gap: .6rem; }
.tg-tests-failures li { padding: .7rem .9rem; border-radius: .8rem; background: rgba(229, 50, 46, .05); border-left: 3px solid var(--tg-red); }
.tg-tests-failures b { display: block; font-weight: 500; }
.tg-tests-file { display: block; font-size: .78rem; color: var(--tg-muted); margin-top: .15rem; word-break: break-all; }
.tg-tests-message { margin: .4rem 0 0; font-size: .78rem; white-space: pre-wrap; word-break: break-word; max-height: 12rem; overflow: auto; }
.tg-tests-hint { margin: .5rem 0 0 1.4rem; font-size: .85rem; color: var(--tg-red-2); }
.tg-tests-log { margin: .5rem 0 0 1.4rem; }
.tg-tests-log summary { cursor: pointer; font-size: .82rem; color: var(--tg-red); font-weight: 500; }
.tg-tests-log pre { margin-top: .5rem; max-height: 24rem; overflow: auto; padding: .9rem 1rem; border-radius: .8rem;
  background: var(--tg-navy-3); color: #e7e8ec; font-size: .74rem; line-height: 1.45; white-space: pre-wrap; word-break: break-word; }
@keyframes tg-tests-pulse { 50% { opacity: .3; } }

/* ---------- pagina di accesso ---------- */
.fi-simple-layout:has(.tg-auth-visual) { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); min-height: 100dvh; }
.fi-simple-layout:has(.tg-auth-visual) .fi-simple-main-ctn {
  position: relative; isolation: isolate; display: flex; align-items: center; justify-content: center; padding: 3rem 2rem;
  background: var(--tg-cream);
}
.fi-simple-layout:has(.tg-auth-visual) .fi-simple-main-ctn::before { content: ""; position: absolute; inset: 0; z-index: -1;
  background-image: radial-gradient(rgba(26, 31, 47, .09) 1px, transparent 1.4px); background-size: 18px 18px;
  mask-image: radial-gradient(ellipse at 50% 50%, #000 20%, transparent 75%); }
.fi-simple-layout:has(.tg-auth-visual) .fi-simple-main {
  width: 100%; max-width: 27rem; background: #fff; border-radius: 1.8rem; padding: 2.4rem 2.2rem;
  border: 1px solid var(--tg-line); box-shadow: 0 40px 80px -40px rgba(26, 31, 47, .45);
  animation: tg-rise .9s .15s var(--tg-ease) both;
}
.fi-simple-header .fi-logo { height: 2.8rem !important; }
.fi-simple-header-heading { font-size: 1.7rem; }
.fi-simple-layout:has(.tg-auth-visual) .fi-btn.fi-color-primary { width: 100%; padding-block: .85rem; font-size: 1rem; }
.tg-auth-visual { position: relative; overflow: hidden; isolation: isolate; color: #fff; background: var(--tg-navy-3); min-height: 100dvh; }
.tg-auth-bg { position: absolute; inset: -4%; z-index: -3; background: url(../images/admin/accesso.jpg) center / cover; animation: tg-zoom 24s ease-in-out infinite alternate; }
.tg-auth-visual::before { content: ""; position: absolute; inset: 0; z-index: -2;
  background: linear-gradient(160deg, rgba(19, 22, 31, .55) 0%, rgba(19, 22, 31, .82) 55%, rgba(19, 22, 31, .97) 100%); }
.tg-auth-visual::after { content: ""; position: absolute; inset: 0; z-index: -1; background: url(../images/admin/sfondo-black.jpg) center / cover;
  mix-blend-mode: screen; opacity: .35; mask-image: linear-gradient(0deg, #000 0%, transparent 60%); }
.tg-auth-glow { position: absolute; z-index: -1; width: 40rem; height: 40rem; left: -14rem; bottom: -18rem; border-radius: 50%;
  background: radial-gradient(circle, rgba(229, 50, 46, .6), transparent 65%); filter: blur(10px); animation: tg-float 10s ease-in-out infinite; }
.tg-auth-inner { position: relative; height: 100%; min-height: 100dvh; display: flex; flex-direction: column; padding: 3rem 3.5rem; }
.tg-auth-logo { height: 3.2rem; width: auto; align-self: flex-start; animation: tg-rise .8s var(--tg-ease) both; }
.tg-auth-copy { margin-top: auto; animation: tg-rise .9s .15s var(--tg-ease) both; }
.tg-auth-copy .tg-kicker { color: #ff8a87; }
.tg-auth-title { font-size: 3.4rem; line-height: 1.02; margin: .7rem 0 1rem; }
.tg-auth-lead { font-size: 1.1rem; color: rgba(255, 255, 255, .78); max-width: 28rem; }
.tg-auth-points { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .8rem; margin: 2.4rem 0 2rem; padding: 0; animation: tg-rise .9s .3s var(--tg-ease) both; }
.tg-auth-points li { font-size: .88rem; line-height: 1.4; padding: 1rem; border-radius: 1.1rem; background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .12); backdrop-filter: blur(10px); transition: background .3s, transform .4s var(--tg-ease); }
.tg-auth-points li:hover { background: rgba(229, 50, 46, .85); transform: translateY(-4px); }
.tg-auth-points span { display: block; font-family: 'Lexend Exa', Outfit, sans-serif; font-weight: 300; font-size: 1.3rem; color: #ff8a87; margin-bottom: .3rem; }
.tg-auth-points li:hover span { color: #fff; }
.tg-auth-foot { font-size: .8rem; letter-spacing: .2em; text-transform: uppercase; color: rgba(255, 255, 255, .5); }

/* ---------- animazioni ---------- */
@keyframes tg-rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes tg-float { 50% { transform: translate(2rem, 1.5rem) scale(1.08); } }
@keyframes tg-zoom { from { transform: scale(1); } to { transform: scale(1.08) translate(-1%, -1%); } }

/* ---------- tablet e telefono ---------- */
@media (max-width: 1100px) {
  .tg-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tg-auth-points { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .fi-simple-layout:has(.tg-auth-visual) { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .tg-auth-visual, .tg-auth-inner { min-height: 0; }
  .tg-auth-inner { padding: 1.6rem 1.4rem 2rem; }
  .tg-auth-copy { margin-top: 1.4rem; }
  .tg-auth-logo { height: 2.4rem; }
  .tg-auth-title { font-size: 1.8rem; margin-bottom: .4rem; }
  .tg-auth-lead { display: none; }
  .tg-auth-points, .tg-auth-foot { display: none; }
  .fi-simple-layout:has(.tg-auth-visual) .fi-simple-main-ctn { padding: 1.4rem 1rem 2.4rem; align-items: flex-start; }
  .fi-simple-layout:has(.tg-auth-visual) .fi-simple-main { margin-top: -1.6rem; padding: 1.8rem 1.4rem; }
}
@media (max-width: 640px) {
  .tg-hero { padding: 1.8rem 1.4rem; min-height: 0; border-radius: 1.4rem; }
  .tg-hero-title { font-size: 1.9rem; }
  .tg-hero-word { font-size: 7rem; bottom: -1.6rem; }
  .tg-hero-actions .tg-btn { flex: 1 1 100%; justify-content: center; }
  .tg-cards { grid-template-columns: 1fr 1fr; gap: .7rem; }
  .tg-card { min-height: 10rem; padding: 1.1rem; border-radius: 1.3rem; }
  .tg-card-value { font-size: 2.4rem; }
  .tg-card-arrow { display: none; }
  .tg-panel { padding: 1.2rem; }
  .fi-header-heading { font-size: 1.6rem; }
}
@media (prefers-reduced-motion: reduce) {
  .tg-hero, .tg-card, .tg-panel, .tg-auth-bg, .tg-auth-glow, .tg-hero-glow, .tg-auth-logo, .tg-auth-copy, .tg-auth-points,
  .fi-simple-layout:has(.tg-auth-visual) .fi-simple-main { animation: none !important; }
}

/* ---------- assistente: conversazione in forma di chat ---------- */
.tg-chat-scroll { max-height: min(65vh, 40rem); overflow-y: auto; overscroll-behavior: contain; padding: 1rem; border: 1px solid var(--tg-line); border-radius: 1rem; background: #fff; }
.tg-chat-scroll:focus-visible { outline: 2px solid var(--tg-navy); outline-offset: 2px; }
.tg-chat { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .9rem; }
.tg-chat-msg { display: flex; flex-direction: column; max-width: min(42rem, 85%); }
.tg-chat-msg-user { align-self: flex-start; }
.tg-chat-msg-bot { align-self: flex-end; align-items: flex-end; }
.tg-chat-meta { font-size: .72rem; letter-spacing: .04em; text-transform: uppercase; color: var(--tg-muted); margin: 0 .5rem .3rem; }
.tg-chat-bubble { padding: .75rem 1rem; border-radius: 1.1rem; white-space: pre-line; overflow-wrap: anywhere; line-height: 1.5; font-size: .92rem; }
.tg-chat-msg-user .tg-chat-bubble { background: var(--tg-cream); color: var(--tg-navy); border: 1px solid var(--tg-line); border-bottom-left-radius: .3rem; }
.tg-chat-msg-bot .tg-chat-bubble { background: var(--tg-navy); color: #fff; border-bottom-right-radius: .3rem; }
.tg-chat-empty { font-size: .9rem; color: var(--tg-muted); }
@media (max-width: 640px) { .tg-chat-msg { max-width: 100%; } }

/* ---------- social: galleria, descrizione e storico del post ---------- */
.tg-social-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(10.5rem, 1fr)); gap: 1rem; }
.tg-social-photo { margin: 0; }
.tg-social-thumb { position: relative; display: block; width: 100%; aspect-ratio: 1; overflow: hidden; padding: 0; border: 1px solid var(--tg-line); border-radius: .9rem; background: #fff; cursor: zoom-in; }
.tg-social-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s var(--tg-ease); }
.tg-social-thumb:hover img { transform: scale(1.04); }
.tg-social-thumb:focus-visible { outline: 2px solid var(--tg-navy); outline-offset: 2px; }
.tg-social-pos { position: absolute; left: .45rem; top: .45rem; min-width: 1.5rem; padding: .05rem .4rem; border-radius: 999px; background: var(--tg-navy); color: #fff; font-size: .75rem; font-weight: 600; text-align: center; }
.tg-social-caption { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-top: .4rem; font-size: .78rem; }
.tg-social-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--tg-muted); }
.tg-social-zoom { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; padding: 1rem; background: rgba(19, 22, 31, .85); cursor: zoom-out; }
.tg-social-zoom img { max-width: 100%; max-height: 100%; border-radius: .8rem; }
.tg-social-text { padding: 1rem 1.1rem; border: 1px solid var(--tg-line); border-radius: .9rem; background: var(--tg-cream); white-space: pre-line; overflow-wrap: anywhere; line-height: 1.55; font-size: .92rem; margin-bottom: .8rem; }
.tg-social-history { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .5rem; font-size: .88rem; }
.tg-social-step { padding: .55rem .8rem; border-left: 3px solid var(--tg-line); }
.tg-social-step-onbehalf { border-left-color: #d97706; background: #fffbeb; border-radius: 0 .6rem .6rem 0; }
.tg-social-when, .tg-social-who { color: var(--tg-muted); }
.tg-social-flag { display: inline-block; margin-left: .4rem; padding: .05rem .5rem; border-radius: 999px; background: #fde68a; color: #78350f; font-size: .72rem; font-weight: 600; letter-spacing: .02em; }
.tg-social-note { margin: .3rem 0 0; white-space: pre-line; overflow-wrap: anywhere; color: var(--tg-navy); }
