﻿html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

a, .btn-link {
    color: #006bb7;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

/* Stili personalizzati per la pagina Disponibilità */
.card {
    border: none;
    border-radius: 0.5rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card.shadow-sm {
    box-shadow: 0 0.125rem 0.5rem rgba(0, 0, 0, 0.075) !important;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

.card-header {
    border-top-left-radius: 0.5rem;
    border-top-right-radius: 0.5rem;
    border-bottom: 2px solid rgba(0, 0, 0, 0.05);
}

.table-hover tbody tr:hover {
    background-color: rgba(13, 110, 253, 0.05);
    cursor: pointer;
}

.badge {
    padding: 0.5em 0.8em;
    font-weight: 500;
}

.btn {
    transition: all 0.2s ease;
}

.btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.15);
}

.alert {
    border-radius: 0.5rem;
    border: none;
}

.form-control:focus, .form-select:focus {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.display-6 {
    font-weight: 600;
    color: #212529;
}

.fw-semibold {
    font-weight: 600 !important;
}

/* Stili per tab settimane confermate */
.nav-pills .nav-link.confirmed-week {
    background-color: #28a745 !important;
    color: white !important;
    border: 2px solid #1e7e34;
}

.nav-pills .nav-link.confirmed-week.active {
    background-color: #1e7e34 !important;
    color: white !important;
    box-shadow: 0 0.25rem 0.5rem rgba(40, 167, 69, 0.5);
}

.nav-pills .nav-link {
    margin-right: 0.5rem;
    border-radius: 0.5rem;
    text-align: center;
    min-width: 140px;
}

/* Accordion recap */
.accordion-button:not(.collapsed) {
    background-color: #e7f1ff;
    color: #084298;
}

.accordion-button:focus {
    box-shadow: none;
    border-color: rgba(0,0,0,.125);
}

/* Animazione accordion Blazor */
.accordion-collapse {
    transition: all 0.35s ease;
}

.accordion-collapse:not(.show) {
    display: none;
}

.accordion-collapse.show {
    display: block;
}

.accordion-button {
    cursor: pointer;
}

.accordion-button::after {
    transition: transform 0.2s ease-in-out;
}

/* Card giorni settimana */
.card h-100 {
    transition: all 0.2s ease;
}

.card.border-primary {
    box-shadow: 0 0.25rem 0.75rem rgba(13, 110, 253, 0.25);
}

/* Migliora contrasto testo bianco su sfondo blu */
.card-header.bg-primary {
    background-color: #0d6efd !important;
}

.card-header.bg-primary *,
.card-header.bg-primary h5,
.card-header.bg-primary h6,
.card-header.bg-primary .card-title,
.card-header.bg-primary i,
.card-header.bg-primary strong {
    color: white !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* ...tranne tendine, campi, pulsanti e badge chiari, che hanno sfondo bianco */
.card-header.bg-primary select,
.card-header.bg-primary select *,
.card-header.bg-primary input,
.card-header.bg-primary .btn-light,
.card-header.bg-primary .badge.bg-light,
.card-header.bg-primary .badge.bg-light * {
    color: #212529 !important;
    text-shadow: none;
}

.card-header.bg-success {
    background-color: #198754 !important;
}

.card-header.bg-success *,
.card-header.bg-success h5,
.card-header.bg-success .badge {
    color: white !important;
}

/* Stili per sidebar header */
.sidebar-header {
    border-color: rgba(255, 255, 255, 0.2) !important;
}

.sidebar-header .fw-bold {
    font-size: 1.25rem;
    letter-spacing: 0.5px;
}
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}
/* ==========================================================================
   Tema Fenix: brace, ambra e notte. Sovrascrive i colori di Bootstrap in
   un solo punto: pulsanti, badge, link e intestazioni seguono il marchio.
   ========================================================================== */
:root {
    --fx-brace: #E8562A;
    --fx-brace-scura: #C2410C;
    --fx-ambra: #F59E0B;
    --fx-notte: #1B1210;
    --fx-notte-2: #3A1611;
    --fx-crema: #FFF4EC;

    --bs-primary: var(--fx-brace);
    --bs-primary-rgb: 232, 86, 42;
    --bs-link-color: var(--fx-brace-scura);
    --bs-link-color-rgb: 194, 65, 12;
    --bs-link-hover-color: #9A3412;
    --bs-link-hover-color-rgb: 154, 52, 18;
    --bs-body-bg: #FCFAF8;
}

html, body {
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--bs-body-bg);
}

a, .btn-link {
    color: var(--bs-link-color);
}

.btn-primary {
    --bs-btn-bg: var(--fx-brace);
    --bs-btn-border-color: var(--fx-brace);
    --bs-btn-hover-bg: var(--fx-brace-scura);
    --bs-btn-hover-border-color: var(--fx-brace-scura);
    --bs-btn-active-bg: #9A3412;
    --bs-btn-active-border-color: #9A3412;
    --bs-btn-disabled-bg: var(--fx-brace);
    --bs-btn-disabled-border-color: var(--fx-brace);
    background-color: var(--bs-btn-bg);
    border-color: var(--bs-btn-border-color);
}

.btn-outline-primary {
    --bs-btn-color: var(--fx-brace-scura);
    --bs-btn-border-color: var(--fx-brace);
    --bs-btn-hover-bg: var(--fx-brace);
    --bs-btn-hover-border-color: var(--fx-brace);
    --bs-btn-active-bg: var(--fx-brace-scura);
    --bs-btn-active-border-color: var(--fx-brace-scura);
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem rgba(232, 86, 42, 0.45);
}

.form-control:focus, .form-select:focus {
    border-color: #F4A07F;
}

.form-check-input:checked {
    background-color: var(--fx-brace);
    border-color: var(--fx-brace);
}

.nav-pills .nav-link.active, .nav-pills .show > .nav-link {
    background-color: var(--fx-brace);
}

.table-hover tbody tr:hover {
    background-color: rgba(232, 86, 42, 0.05);
}

/* Intestazioni delle card "primarie": sfumatura brace -> ambra */
.card-header.bg-primary {
    background: linear-gradient(120deg, var(--fx-brace-scura), var(--fx-brace) 55%, var(--fx-ambra)) !important;
    border-bottom: none;
}

/* Marchio Fenix (barra laterale e login) */
.fx-marchio {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    text-decoration: none;
}

.fx-marchio img {
    width: 24px;
    height: 24px;
    opacity: 0.9;
}

.fx-marchio .fx-nome {
    font-weight: 800;
    font-size: 1.35rem;
    letter-spacing: 0.04em;
    line-height: 1.3;
    background: linear-gradient(90deg, #FFD29A, var(--fx-ambra) 45%, #FF7A45);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.fx-marchio .fx-motto {
    display: block;
    font-size: 0.7rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(255, 236, 220, 0.6);
    margin-top: 0.2rem;
}

/* Pagina di accesso */
.fx-accesso {
    border: none;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 1rem 2.5rem rgba(58, 22, 17, 0.18) !important;
}

.fx-accesso-testata {
    background: radial-gradient(120% 140% at 50% 0%, #5A1E12 0%, var(--fx-notte-2) 45%, var(--fx-notte) 100%);
    color: var(--fx-crema);
    text-align: center;
    padding: 1.5rem 1.5rem 1.25rem;
}

/* Gattino discreto accanto al nome */
.fx-accesso-testata img {
    width: 28px;
    height: 28px;
    vertical-align: middle;
    margin-right: 0.4rem;
    margin-top: -0.3rem;
    opacity: 0.9;
}

.fx-accesso-testata .fx-nome {
    display: inline-block;
    vertical-align: middle;
    font-weight: 800;
    font-size: 2rem;
    letter-spacing: 0.06em;
    background: linear-gradient(90deg, #FFD29A, var(--fx-ambra) 45%, #FF7A45);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.fx-accesso-testata .fx-motto {
    display: block;
    font-size: 0.8rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(255, 236, 220, 0.65);
}

/* Pagine di accesso senza barra laterale: sfondo notte con bagliore di brace */
.fx-accesso-pagina {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background-color: var(--fx-notte);
    background-image:
        radial-gradient(90% 60% at 50% 110%, rgba(232, 86, 42, 0.35) 0%, rgba(232, 86, 42, 0) 70%),
        radial-gradient(60% 40% at 50% -10%, rgba(245, 158, 11, 0.12) 0%, rgba(245, 158, 11, 0) 70%);
}

.fx-accesso-pagina > main {
    width: 100%;
}

.fx-accesso-pagina .fx-accesso {
    box-shadow: 0 1.5rem 3rem rgba(0, 0, 0, 0.45) !important;
}

/* Logotipo: il gattino come puntino della i, grande abbastanza da riconoscerlo (sporge sopra le lettere) */
.fx-nome .fx-i {
    position: relative;
    display: inline-block;
    /* colore pieno intonato alla sfumatura del nome in quel punto */
    color: #FA8A2E;
    -webkit-text-fill-color: #FA8A2E;
}

.fx-nome .fx-i img {
    position: absolute;
    left: 50%;
    top: -0.28em;
    width: 0.82em;
    height: 0.82em;
    transform: translateX(-54%);
}

.fx-marchio .fx-nome {
    font-size: 1.6rem;
    padding-top: 0.5rem;
}

.fx-accesso-testata .fx-nome {
    line-height: 1.3;
    font-size: 2.6rem;
    padding-top: 0.8rem;
}

/* Pagine di accesso: il gattino di fianco al nome (dopo il login si trascina sopra la i, vedi fenix.arrivoGattino) */
.fx-accesso-testata .fx-nome-accanto {
    padding-top: 0.2rem;
}

.fx-gatto-in-attesa .fx-marchio .fx-i img {
    visibility: hidden;
}

.fx-nome-accanto .fx-gatto-accanto {
    width: 0.9em;
    height: 0.9em;
    margin-left: 0.2em;
    vertical-align: -0.08em;
}

/* Halloween: gattino con il cappello da strega (fenix-logo-halloween.svg). Il disegno è più alto e più largo
   per il cappello: si ingrandisce e si alza di conseguenza, così la faccia resta grande uguale e nello stesso punto */
.fx-nome .fx-i img.fx-gatto-halloween {
    top: -0.485em;
    width: 1.025em;
    height: 1.025em;
}

.fx-nome-accanto .fx-gatto-accanto.fx-gatto-halloween {
    width: 1.125em;
    height: 1.125em;
    margin-left: 0.1em;
}

/* Voce selezionata negli elenchi: colore del tema invece del blu Bootstrap */
.list-group-item.active {
    background-color: var(--fx-brace);
    border-color: var(--fx-brace);
}

/* Smartphone: titoli più compatti, niente barra "Home" (il nome Fenix riporta alla home) */
@media (max-width: 640.98px) {
    main > .top-row {
        display: none !important;
    }

    article.content {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }

    .content h1.display-6, .content h1 {
        font-size: 1.5rem;
    }
}

/* Contenuto delle pagine di accesso secondarie dentro la scheda: niente griglie a mezza larghezza */
.fx-accesso-scheda .card-body h1 {
    font-size: 1.4rem;
    text-align: center;
}

.fx-accesso-scheda .card-body h2 {
    font-size: 1rem;
    font-weight: 400;
    color: #6c757d;
    text-align: center;
}

.fx-accesso-scheda .card-body .row > [class*="col-"] {
    flex: 0 0 100%;
    max-width: 100%;
}

.fx-accesso-scheda .card-body hr {
    display: none;
}

/* Disponibilità: giorni passati in grigio (non più inseribili) */
.fx-giorno-passato {
    background-color: #f1efed;
    opacity: 0.6;
    filter: grayscale(1);
}

/* Barra laterale richiudibile da computer (pulsante in alto, scelta memorizzata) */
.fx-alterna-barra {
    color: var(--fx-brace-scura);
    border: 1px solid #e3d6cf;
    background: #fff;
}

.fx-alterna-barra:hover {
    background: var(--fx-crema);
    color: var(--fx-brace);
}

/* Il nome Fenix in alto compare solo a barra chiusa */
.fx-marchio-ridotto {
    display: none;
}

.fx-marchio-ridotto .fx-nome {
    font-size: 1.25rem;
    padding-top: 0.45rem;
}

@media (min-width: 641px) {
    html.fx-barra-chiusa .page > .sidebar {
        display: none;
    }

    html.fx-barra-chiusa .fx-marchio-ridotto {
        display: flex;
    }
}

/* Dimensione del testo scelta dall'utente: tutto il portale usa rem, quindi scala in proporzione */
html.fx-testo-grande {
    font-size: 112.5%;
}

html.fx-testo-molto-grande {
    font-size: 125%;
}

/* Con il testo ingrandito la barra laterale si allarga, così le voci restano su una riga */
@media (min-width: 641px) {
    html.fx-testo-grande .page > .sidebar {
        width: 280px;
    }

    html.fx-testo-molto-grande .page > .sidebar {
        width: 310px;
    }
}

.fx-dimensione-testo {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.fx-dimensione-etichetta {
    font-size: 0.85rem;
    margin-right: 0.25rem;
}

.fx-dim {
    min-width: 2.5rem;
    min-height: 2.25rem;
    border-radius: 0.4rem;
    font-weight: 700;
    line-height: 1;
    padding: 0.35rem 0.5rem;
    border: 1px solid transparent;
    background: transparent;
    cursor: pointer;
}

.fx-dim[data-livello="normale"] { font-size: 0.9rem; }
.fx-dim[data-livello="grande"] { font-size: 1.05rem; }
.fx-dim[data-livello="molto-grande"] { font-size: 1.2rem; }

/* Nel menu scuro */
.fx-dimensione-menu {
    padding: 0.75rem 0 0.25rem;
    border-top: 1px solid rgba(245, 158, 11, 0.18);
    width: 100%;
}

.fx-dimensione-menu .fx-dimensione-etichetta {
    color: rgba(255, 236, 220, 0.7);
}

.fx-dimensione-menu .fx-dim {
    color: #f3e6dc;
    border-color: rgba(255, 255, 255, 0.18);
}

/* scelta attiva: dipende solo dalla classe su <html>, resiste ai ridisegni di Blazor */
.fx-dimensione-menu .fx-dim:hover,
html:not(.fx-testo-grande):not(.fx-testo-molto-grande) .fx-dimensione-menu .fx-dim[data-livello="normale"],
html.fx-testo-grande .fx-dimensione-menu .fx-dim[data-livello="grande"],
html.fx-testo-molto-grande .fx-dimensione-menu .fx-dim[data-livello="molto-grande"] {
    background: var(--fx-brace);
    border-color: var(--fx-brace);
    color: #fff;
}

/* Nelle pagine di accesso: in alto a destra, sullo sfondo scuro */
.fx-dimensione-accesso {
    position: absolute;
    top: 1rem;
    right: 1rem;
}

.fx-dimensione-accesso .fx-dimensione-etichetta {
    color: rgba(255, 236, 220, 0.7);
}

.fx-dimensione-accesso .fx-dim {
    color: #f3e6dc;
    border-color: rgba(255, 255, 255, 0.2);
}

/* scelta attiva: dipende solo dalla classe su <html>, resiste ai ridisegni di Blazor */
.fx-dimensione-accesso .fx-dim:hover,
html:not(.fx-testo-grande):not(.fx-testo-molto-grande) .fx-dimensione-accesso .fx-dim[data-livello="normale"],
html.fx-testo-grande .fx-dimensione-accesso .fx-dim[data-livello="grande"],
html.fx-testo-molto-grande .fx-dimensione-accesso .fx-dim[data-livello="molto-grande"] {
    background: var(--fx-brace);
    border-color: var(--fx-brace);
    color: #fff;
}

.fx-accesso-pagina {
    position: relative;
}

/* Stato delle provvigioni: i nomi lunghi del CRM vanno a capo, gli importi restano su una riga */
.badge.fx-stato {
    white-space: normal;
    text-align: left;
    max-width: 12rem;
    line-height: 1.25;
}

table:has(.fx-stato) td.text-end {
    white-space: nowrap;
}

/* Stati degli appuntamenti negli elenchi: una riga sola, troncata con "…" (testo completo nel dettaglio) */
.badge.fx-stato-breve {
    display: inline-block;
    max-width: 12rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: middle;
}

/* "Accedi come": barra sempre visibile in cima alle pagine */
.fx-barra-impersonazione {
    position: sticky;
    top: 0;
    z-index: 1030;
    background: #ffc107;
    color: #212529;
    font-size: 0.95rem;
}

/* Tabella appuntamenti (computer): sta nella larghezza della pagina, senza scorrimento orizzontale.
   Cliente in una colonna limitata (i nomi lunghi vanno a capo); venditore, prodotto e città vanno a capo; stati brevi su una riga */
.fx-tabella-app td.fx-app-cliente {
    min-width: 5rem;
    max-width: 15rem;
    white-space: normal;
    overflow-wrap: anywhere;
}

.fx-tabella-app .badge.fx-stato-breve {
    max-width: 9rem;
}

/* Kraken, il gattino del logo, che dà un avviso in un fumetto (componente KrakenDice) */
.fx-kraken {
    display: flex;
    align-items: flex-end;
    gap: 0.9rem;
}

.fx-kraken-gatto {
    width: 3.6rem;
    height: 3.6rem;
    flex-shrink: 0;
}

/* Halloween: disegno con il cappello, più alto e più largo (riquadro 80 invece di 64): più grande e con i margini
   negativi ai lati, così la faccia resta grande uguale e allo stesso posto; il cappello sporge sopra */
.fx-kraken-gatto.fx-kraken-halloween {
    width: 4.5rem;
    height: 4.5rem;
    margin: 0 -0.45rem;
}

.fx-fumetto {
    position: relative;
    flex: 1 1 auto;
    min-width: 0;
    padding: 0.7rem 1rem;
    border-radius: 1rem;
    background: var(--bs-warning-bg-subtle);
    border: 1px solid var(--bs-warning-border-subtle);
    color: var(--bs-warning-text-emphasis);
}

/* la punta del fumetto verso la bocca di Kraken: bordo + riempimento */
.fx-fumetto::before,
.fx-fumetto::after {
    content: "";
    position: absolute;
    bottom: 1.1rem;
    border-style: solid;
    border-color: transparent;
}

.fx-fumetto::before {
    left: -0.75rem;
    border-width: 0.5rem 0.75rem 0.5rem 0;
    border-right-color: var(--bs-warning-border-subtle);
}

.fx-fumetto::after {
    left: calc(-0.75rem + 1.5px);
    border-width: 0.5rem 0.75rem 0.5rem 0;
    border-right-color: var(--bs-warning-bg-subtle);
}

/* Kraken furioso (ultimo giorno): fumetto rosso */
.fx-kraken-furioso .fx-fumetto {
    background: var(--bs-danger-bg-subtle);
    border-color: var(--bs-danger-border-subtle);
    color: var(--bs-danger-text-emphasis);
}

.fx-kraken-furioso .fx-fumetto::before {
    border-right-color: var(--bs-danger-border-subtle);
}

.fx-kraken-furioso .fx-fumetto::after {
    border-right-color: var(--bs-danger-bg-subtle);
}

/* Gestione Permessi, matrice per tipologia: tendine abbastanza larghe per "Modifica" */
.fx-tabella-permessi select {
    min-width: 7.5rem;
}

/* Elenco appuntamenti da telefono */
.fx-app-voce {
    cursor: pointer;
}

.fx-app-voce:active {
    background-color: var(--bs-tertiary-bg);
}

/* Occhio per mostrare la password */
.form-floating:has(> .fx-occhio) > .form-control {
    padding-right: 3rem;
}

.fx-occhio {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 5;
    width: 3rem;
    height: calc(3.5rem + calc(var(--bs-border-width) * 2));
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--bs-secondary-color);
    font-size: 1.15rem;
}

.fx-occhio:hover,
.fx-occhio:focus-visible {
    color: var(--bs-body-color);
}

/* Ricerca venditore per nome */
.fx-cerca-risultati {
    max-height: 18rem;
    overflow-y: auto;
    z-index: 1060;
}

.fx-filtro-venditore {
    width: 16rem;
    max-width: 100%;
}

/* La scheda che contiene la ricerca resta sopra alle schede successive, così l'elenco dei risultati non viene coperto */
.card:has(.fx-cerca-venditore) {
    position: relative;
    z-index: 20;
}

.card:has(.fx-cerca-venditore):hover {
    transform: none;
}

.fx-cerca-risultati .dropdown-item.active,
.fx-cerca-risultati .dropdown-item:active {
    background-color: var(--fx-brace);
    color: #fff;
}

/* ---------- Agenda venditori (Components/Pages/Agenda.razor) ---------- */
/* Totale per consulente e per giorno: il nome resta fermo quando la tabella scorre di lato */
.fx-agenda-griglia {
    font-size: 0.9rem;
    /* il livello della colonna ferma vale solo dentro la tabella: scorrendo la pagina i nomi non passano sopra la barra in alto */
    isolation: isolate;
}

.fx-agenda-griglia .fx-agenda-nome {
    position: sticky;
    left: 0;
    z-index: 1;
    min-width: 11rem;
    max-width: 16rem;
    background-color: var(--bs-body-bg);
}

.fx-agenda-griglia thead .fx-agenda-nome,
.fx-agenda-griglia tfoot .fx-agenda-nome {
    background-color: var(--bs-tertiary-bg);
}

.fx-agenda-griglia td {
    min-width: 3rem;
    height: 2.4rem;
}

.fx-agenda-griglia th.fx-agenda-oggi {
    color: var(--fx-brace);
}

.fx-agenda-griglia td.fx-agenda-piena {
    background-color: #fde7d6;
}

.fx-agenda-griglia td.fx-agenda-piena:hover {
    background-color: #fbc8a3;
}

/* Casella di cui si stanno guardando i clienti */
.fx-agenda-griglia td.fx-agenda-scelta {
    background-color: var(--fx-brace);
}

.fx-agenda-griglia td.fx-agenda-scelta .fx-agenda-cella {
    color: #fff;
}

/* La riga dei giorni resta ferma: la tabella scorre dentro il suo riquadro, alto quanto lo schermo */
.fx-agenda-scorri {
    max-height: calc(100dvh - 9rem);
    overflow: auto;
}

.fx-agenda-griglia thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background-color: var(--bs-tertiary-bg);
    box-shadow: inset 0 -1px 0 var(--bs-border-color);
}

.fx-agenda-griglia thead th.fx-agenda-nome {
    z-index: 3;
}

/* Inizio e fine della disponibilità sotto il numero di appuntamenti */
.fx-agenda-disp {
    display: block;
    font-size: 0.7rem;
    font-weight: 400;
    line-height: 1.1;
    white-space: nowrap;
    color: var(--bs-secondary-color);
    font-variant-numeric: tabular-nums;
}

.fx-agenda-disp.fx-agenda-nondisp,
.fx-agenda-disp-giorno.fx-agenda-nondisp {
    color: var(--bs-danger);
    font-weight: 600;
}

.fx-agenda-disp.fx-agenda-noninserita {
    color: var(--bs-tertiary-color);
    font-style: italic;
}

.fx-agenda-griglia td.fx-agenda-scelta .fx-agenda-disp {
    color: #fff;
}

.fx-agenda-disp-giorno {
    margin-left: 0.75rem;
    font-weight: 400;
    color: var(--bs-secondary-color);
    font-variant-numeric: tabular-nums;
}

.fx-agenda-cella {
    width: 100%;
    min-height: 2.4rem;
    padding: 0.2rem 0.1rem;
    border: 0;
    font-weight: 700;
    color: #3b1d0e;
    background: none;
}

/* Clienti del consulente nel giorno scelto */
.fx-agenda-dettaglio {
    scroll-margin-top: 4rem;
}

.fx-agenda-giorno {
    padding: 0.4rem 1rem;
    font-weight: 600;
    background-color: var(--bs-tertiary-bg);
    border-top: 1px solid var(--bs-border-color);
}

.fx-agenda-app {
    display: flex;
    gap: 1rem;
    padding: 0.6rem 1rem;
    border-top: 1px solid var(--bs-border-color-translucent);
}

.fx-agenda-ora {
    flex: 0 0 6.5rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.fx-agenda-testo {
    min-width: 0;
    overflow-wrap: anywhere;
}

.fx-agenda-testo a {
    color: inherit;
    text-decoration: none;
}

.fx-agenda-testo a:hover {
    color: var(--fx-brace);
    text-decoration: underline;
}

.fx-agenda-testo .bi-geo-alt {
    color: var(--fx-brace);
}

@media (max-width: 575.98px) {
    .fx-agenda-app {
        flex-direction: column;
        gap: 0.15rem;
    }

    .fx-agenda-ora {
        flex-basis: auto;
    }

    /* 5 giorni + totale stanno nella larghezza del telefono */
    .fx-agenda-griglia {
        font-size: 0.8rem;
    }

    .fx-agenda-griglia .fx-agenda-nome {
        min-width: 0;
        max-width: 7rem;
    }

    .fx-agenda-disp {
        font-size: 0.62rem;
        white-space: normal;
    }

    .fx-agenda-griglia td,
    .fx-agenda-griglia th {
        min-width: 0;
        padding-left: 0.15rem;
        padding-right: 0.15rem;
    }
}

/* ---------- Gerarchia (Components/Pages/Gerarchia.razor, GerarchiaNodo.razor) ---------- */
.fx-gerarchia-riga {
    padding: 0.2rem 0;
}

/* Il triangolino resta accanto al nome anche quando la riga va a capo (telefono) */
.fx-gerarchia-ramo > summary {
    display: flex;
    align-items: baseline;
    gap: 0.35rem;
    list-style: none;
    cursor: pointer;
}

.fx-gerarchia-ramo > summary::-webkit-details-marker {
    display: none;
}

.fx-gerarchia-ramo > summary::before {
    content: "▸";
    flex: 0 0 0.65rem;
}

.fx-gerarchia-ramo[open] > summary::before {
    content: "▾";
}

/* Ogni livello rientra con una linea a sinistra, così si vede a chi appartiene */
.fx-gerarchia-sotto {
    margin-left: 0.55rem;
    padding-left: 1.1rem;
    border-left: 2px solid var(--bs-border-color);
}

.fx-gerarchia-sotto > .fx-gerarchia-riga {
    padding-left: 1rem;
}

.fx-gerarchia a {
    text-decoration: none;
}

.fx-gerarchia a:hover {
    text-decoration: underline;
}

.fx-gerarchia-trovato {
    background-color: #fde7d6;
    font-weight: 700;
    padding: 0 0.2rem;
    border-radius: 0.2rem;
}

.fx-gerarchia-ruolo {
    font-weight: 600;
}

.fx-gerarchia-terzocapoarea { background-color: #7a2e0e; }
.fx-gerarchia-capoarea { background-color: var(--fx-brace); }
.fx-gerarchia-teamleader { background-color: var(--fx-ambra); color: #3b1d0e; }
.fx-gerarchia-user { background-color: var(--bs-secondary-bg); color: var(--bs-secondary-color); }

.fx-gerarchia-senza > summary {
    cursor: pointer;
}

/* Elenchi lunghi (venditori senza responsabile): su più colonne da computer */
.fx-gerarchia-elenco {
    columns: 3 18rem;
    column-gap: 2rem;
}

/* ---------- Decorazioni stagionali (Services/Stagioni.cs, Components/Layout/Decorazioni.razor) ----------
   Solo grafica: non si cliccano (pointer-events: none) e stanno sotto le finestre modali. */
.fx-decorazioni {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1040;
    overflow: hidden;
}

/* Halloween: pipistrelli che attraversano la pagina ogni tanto. Il volo (lato, altezza, traiettoria, velocità)
   lo decide ogni volta fenix.js, che copia il modello nascosto di Decorazioni.razor */
.fx-tema-halloween .fx-pipistrello {
    position: absolute;
    top: 0;
    left: 0;
    width: calc(64px * var(--scala, 1));
    opacity: 0.85;
    will-change: transform;
}

.fx-tema-halloween .fx-pipistrello svg {
    display: block;
    width: 100%;
    overflow: visible;
    filter: drop-shadow(0 0 3px rgba(255, 170, 90, 0.35));
}

/* Le ali sbattono ruotando dalle spalle */
.fx-tema-halloween .fx-ala {
    transform-box: view-box;
    transform-origin: 54px 25px;
    animation: fx-ali var(--battito, 0.32s) ease-in-out infinite alternate;
}

.fx-tema-halloween .fx-ossa {
    fill: none;
    stroke: #6b4a86;
    stroke-width: 0.7;
    opacity: 0.8;
}

@keyframes fx-ali {
    from { transform: rotate(22deg); }
    to { transform: rotate(-28deg); }
}

/* Ragnatela nell'angolo in alto a destra */
.fx-tema-halloween .fx-ragnatela {
    position: absolute;
    top: 0;
    right: 0;
    width: 150px;
    stroke: #8a8178;
    opacity: 0.55;
}

.fx-tema-halloween .fx-ragnatela .fx-filo {
    stroke: #8a8178;
    transform-origin: 73px 14px;
    animation: fx-filo 6s ease-in-out infinite;
}

.fx-tema-halloween .fx-ragno {
    animation: fx-ragno 6s ease-in-out infinite;
}

.fx-tema-halloween .fx-ragnatela-sinistra {
    right: auto;
    left: 0;
    transform: scaleX(-1);
}

@keyframes fx-ragno {
    0%, 100% { transform: translateY(-18px); }
    50% { transform: translateY(6px); }
}

@keyframes fx-filo {
    0%, 100% { transform: scaleY(0.1); }
    50% { transform: scaleY(1.3); }
}

/* Zucca in basso a sinistra (sul menu); su telefono in basso a destra */
.fx-tema-halloween .fx-zucca {
    position: absolute;
    bottom: 14px;
    left: 18px;
    width: 52px;
    filter: drop-shadow(0 0 8px rgba(242, 140, 56, 0.55));
    animation: fx-dondolo 4s ease-in-out infinite;
    transform-origin: 50% 100%;
}

@keyframes fx-dondolo {
    0%, 100% { transform: rotate(-4deg); }
    50% { transform: rotate(4deg); }
}

@media (max-width: 640.98px) {
    .fx-tema-halloween .fx-ragnatela { display: none; }
    .fx-tema-halloween .fx-zucca { left: auto; right: 12px; width: 40px; }
}

/* Natale (8 dicembre – 6 gennaio): Kraken con il cappello, neve che scende ondeggiando e alberello */
.fx-tema-natale .fx-fiocco {
    position: absolute;
    top: -24px;
    animation-name: fx-neve;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
}

/* Azzurro chiaro con un'ombra leggera: si vede sia sulle pagine chiare sia sulla barra scura */
.fx-tema-natale .fx-puntino {
    border-radius: 50%;
    background: #D6E6F2;
    box-shadow: 0 0 3px rgba(110, 150, 190, 0.6);
    opacity: 0.85;
}

.fx-tema-natale .fx-stella svg {
    display: block;
    width: 100%;
    height: 100%;
    fill: none;
    stroke: #CFE2F1;
    stroke-width: 1.7;
    stroke-linecap: round;
    filter: drop-shadow(0 0 1.5px rgba(90, 130, 175, 0.75));
    opacity: 0.9;
    animation: fx-fiocco-gira 10s linear infinite;
}

@keyframes fx-neve {
    0% { transform: translate3d(0, 0, 0); }
    25% { transform: translate3d(calc(var(--deriva, 20px) * 0.6), 27vh, 0); }
    50% { transform: translate3d(calc(var(--deriva, 20px) * -0.2), 54vh, 0); }
    75% { transform: translate3d(calc(var(--deriva, 20px) * 0.8), 80vh, 0); }
    100% { transform: translate3d(var(--deriva, 20px), 106vh, 0); }
}

@keyframes fx-fiocco-gira {
    to { transform: rotate(360deg); }
}

.fx-tema-natale .fx-alberello {
    position: absolute;
    bottom: 12px;
    left: 18px;
    width: 46px;
    height: auto;
    filter: drop-shadow(0 0 8px rgba(245, 192, 74, 0.35));
}

@media (max-width: 640.98px) {
    .fx-tema-natale .fx-alberello { left: auto; right: 12px; width: 36px; }
    .fx-tema-natale .fx-fiocco:nth-child(3n) { display: none; }
}

/* Chi ha chiesto meno animazioni al sistema: niente pipistrelli in volo, il resto fermo */
@media (prefers-reduced-motion: reduce) {
    .fx-tema-halloween .fx-pipistrello { display: none; }
    .fx-tema-natale .fx-fiocco { display: none; }
    .fx-tema-halloween .fx-ragno,
    .fx-tema-halloween .fx-ragnatela .fx-filo,
    .fx-tema-halloween .fx-zucca { animation: none; }
}

/* Notifiche push nel menu: si vede solo la voce dello stato attuale (classe fx-notifiche-* su <html>, messa da fenix.js).
   !important: le voci sono anche .nav-link, che lo stile del menu mette sempre in display: flex */
html:not(.fx-notifiche-spente) .fx-notifiche .fx-notifiche-attiva,
html:not(.fx-notifiche-attive) .fx-notifiche .fx-notifiche-on,
html:not(.fx-notifiche-bloccate) .fx-notifiche .fx-notifiche-nota-bloccate,
html:not(.fx-notifiche-iphone) .fx-notifiche .fx-notifiche-nota-iphone { display: none !important; }
html:not(.fx-notifiche-spente):not(.fx-notifiche-attive):not(.fx-notifiche-bloccate):not(.fx-notifiche-iphone) .fx-notifiche { display: none; }

.fx-notifiche-nota {
    display: block;
    color: rgba(255, 236, 220, 0.7);
    font-size: 0.85rem;
    line-height: 1.35;
    padding: 0.25rem 0;
}

/* Bagno da foto: procedura a schermo intero (Components/Bagni/BagnoDaFotoProcedura.razor) */
.fx-bagno {
    position: fixed;
    inset: 0;
    z-index: 1060;
    display: flex;
    flex-direction: column;
    background: var(--bs-body-bg);
}
/* Con la procedura o la galleria aperte la pagina sotto (Appuntamenti) non scorre: sul tablet, scorrendo, la barra del
   browser si stringeva e in basso si vedeva una striscia della pagina dietro. */
html:has(.fx-bagno), html:has(.fx-comb) { overflow: hidden; overscroll-behavior: none; }
html:has(.fx-bagno) body, html:has(.fx-comb) body { overflow: hidden; }
html:has(.fx-scuro.fx-bagno), html:has(.fx-scuro.fx-bagno) body, html:has(.fx-comb), html:has(.fx-comb) body { background: #111; }
.fx-bagno-corpo, .fx-comb { overscroll-behavior: contain; }
/* Planner bagno: l'iframe del configuratore occupa tutto lo spazio sotto la testata */
.fx-planner { flex: 1; width: 100%; border: 0; background: #111; }
/* Su Android il livello fisso a volte finisce prima del fondo dello schermo (barra del browser che cambia altezza):
   l'ombra piena lo allunga oltre i bordi e copre comunque la pagina dietro. */
.fx-bagno.fx-scuro, .fx-comb { box-shadow: 0 0 0 100vmax #111; }
.fx-bagno-corpo {
    flex: 1;
    overflow-y: auto;
    width: 100%;
    max-width: 720px;
    margin: 0 auto;
}
.fx-bagno-testa, .fx-bagno-piede {
    background: var(--bs-body-bg);
    padding-bottom: max(.5rem, env(safe-area-inset-bottom));
}
/* Telefono (richiesta di Marco del 21/11/2026): pulsanti alti almeno 44 px, quelli in fondo ancora più grandi;
   le scelte (btn-group) vanno a capo in una griglia invece di schiacciarsi su una riga. */
.fx-bagno .btn { min-height: 44px; }
.fx-bagno .btn.btn-sm { min-height: 38px; }
.fx-bagno-piede .btn { min-height: 50px; font-size: 1.05rem; }
.fx-bagno .btn-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(6.5rem, 1fr));
    gap: .5rem;
}
.fx-bagno .btn-group > .btn {
    border-radius: var(--bs-border-radius) !important;
    margin-left: 0 !important;
}
/* Tastiera aperta: fenix.js accorcia il livello all'area visibile (--fx-bagno-altezza) e porta il campo al centro */
.fx-bagno.fx-tastiera { bottom: auto; height: var(--fx-bagno-altezza, 100%); }
.fx-bagno.fx-tastiera .fx-bagno-piede { display: none !important; }
.fx-bagno-miniatura {
    width: 72px;
    height: 72px;
    object-fit: cover;
    flex-shrink: 0;
}
.fx-bagno-obbligatoria {
    display: inline-block;
    width: .6rem;
    height: .6rem;
    border-radius: 50%;
    background: var(--bs-warning);
    vertical-align: middle;
}

/* Bagno da foto: vista 3D (model-viewer) */
.fx-bagno-3d {
    display: block;
    width: 100%;
    height: min(60vh, 460px);
    background: var(--bs-tertiary-bg);
}
.fx-bagno-ar {
    position: absolute;
    right: .75rem;
    bottom: .75rem;
}

/* Bagno da foto: consigli per la foto dalla porta */
.fx-bagno-consigli { background: var(--bs-tertiary-bg); }
.fx-bagno-schizzo { width: 96px; height: auto; }
.fx-bagno-pianta-misure { width: 100%; max-width: 260px; height: auto; }
.fx-bagno-schizzo-piccolo { width: 60px; height: auto; }

/* Bagno da foto: pallino di colore nei pulsanti "Gusto" */
.fx-bagno-pallino {
    display: inline-block;
    width: .8em;
    height: .8em;
    margin-right: .3em;
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, .25);
    vertical-align: -.05em;
}

/* Bagno da foto: anteprima nell'elenco clienti e proposte */
.fx-bagno-anteprima {
    width: 56px;
    height: 72px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bs-tertiary-bg);
    font-size: 1.4rem;
}
.fx-bagno-anteprima img { width: 100%; height: 100%; object-fit: cover; }
.min-w-0 { min-width: 0; }

/* Bagno da foto: prima/dopo con cursore (le due foto hanno la stessa inquadratura, verticali 2:3) */
.fx-pd, .fx-bagno-pianta, .fx-pd-attesa { max-width: 560px; margin-left: auto; margin-right: auto; }
.fx-pd-attesa { min-height: 160px; background: var(--bs-tertiary-bg); }
/* Foto render del bagno ("Crea foto"): due per riga, una sola al telefono stretto */
.fx-foto-render { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; max-width: 560px; margin-left: auto; margin-right: auto; }
@media (max-width: 360px) { .fx-foto-render { grid-template-columns: 1fr; } }
.fx-pd-quadro {
    --pos: 50%;
    position: relative;
    aspect-ratio: 2 / 3;
    max-height: 78vh;
    margin: 0 auto;
    overflow: hidden;
    user-select: none;
    background: var(--bs-tertiary-bg);
    cursor: ew-resize;
    touch-action: pan-y;   /* in verticale la pagina scorre, in orizzontale si sposta il taglio */
}
.fx-pd-quadro img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
}
.fx-pd-prima { clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.fx-pd-linea {
    position: absolute;
    top: 0;
    bottom: 0;
    left: var(--pos);
    width: 3px;
    margin-left: -1.5px;
    background: #fff;
    box-shadow: 0 0 6px rgba(0, 0, 0, .45);
    pointer-events: none;
}
.fx-pd-linea span {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: #fff;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 6px rgba(0, 0, 0, .4);
}
.fx-pd-linea .bi-arrows { font-size: 1.2rem; }
.fx-pd-etichetta {
    position: absolute;
    top: .6rem;
    padding: .15rem .55rem;
    border-radius: 1rem;
    background: rgba(0, 0, 0, .55);
    color: #fff;
    font-size: .8rem;
    pointer-events: none;
}
.fx-pd-etichetta-prima { left: .6rem; }
.fx-pd-etichetta-dopo { right: .6rem; }

/* Bagno da foto: scelta della combinazione (Components/Bagni/BagnoCombinazioni.razor), da mostrare al cliente sul tablet.
   Sempre su fondo scuro: le foto sono le protagoniste. */
.fx-comb {
    position: fixed;
    inset: 0;
    z-index: 1070;
    background: #111;
    color: #f4f1ec;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    outline: none;
}
.fx-comb-testa {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: max(1.25rem, env(safe-area-inset-top)) 1.5rem 1rem;
    max-width: 1400px;
    margin: 0 auto;
}
.fx-comb-testa h1, .fx-comb-titolo h2, .fx-comb-carta-nome {
    font-family: Georgia, "Times New Roman", serif;
    font-weight: 400;
    letter-spacing: .01em;
}
.fx-comb-testa h1 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); margin: 0; }
.fx-comb-sottotitolo { color: #b9b2a8; margin-top: .25rem; }
.fx-comb-griglia {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
    gap: 1rem;
    padding: 0 1.5rem max(1.5rem, env(safe-area-inset-bottom));
    max-width: 1400px;
    margin: 0 auto;
}
.fx-comb-carta {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 29 / 20;
    padding: 0;
    border: 0;
    border-radius: 14px;
    overflow: hidden;
    background: #222;
    color: #fff;
    text-align: left;
    box-shadow: 0 6px 24px rgba(0, 0, 0, .35);
    transition: transform .2s ease, box-shadow .2s ease;
}
.fx-comb-carta:active { transform: scale(.98); }
.fx-comb-carta > img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .6s ease;
}
@media (hover: hover) {
    .fx-comb-carta:hover > img { transform: scale(1.04); }
}
.fx-comb-velo {
    position: absolute;
    inset: auto 0 0 0;
    padding: 2.5rem 1rem .9rem;
    background: linear-gradient(to top, rgba(0, 0, 0, .78), rgba(0, 0, 0, 0));
}
.fx-comb-carta-nome { font-size: 1.5rem; line-height: 1.1; }
.fx-comb-carta-variante { font-size: .9rem; color: #e2dbd1; margin-top: .15rem; }
.fx-comb-campioni { display: flex; gap: .35rem; margin-top: .6rem; }
.fx-comb-campioni img {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, .85);
}
.fx-comb-scelta { outline: 3px solid var(--fx-brace); outline-offset: 2px; }
.fx-comb-spunta {
    position: absolute;
    top: .75rem;
    right: .75rem;
    width: 2.2rem;
    height: 2.2rem;
    border-radius: 50%;
    background: var(--fx-brace);
    display: grid;
    place-items: center;
    font-size: 1.2rem;
}
.fx-comb-casuale-mosaico {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    filter: saturate(.85) brightness(.7);
}
.fx-comb-casuale-mosaico img { width: 100%; height: 100%; object-fit: cover; }
.fx-comb-velo-pieno {
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    background: radial-gradient(circle at 50% 45%, rgba(0, 0, 0, .35), rgba(0, 0, 0, .78));
}
.fx-comb-casuale-icona {
    font-size: 2rem;
    width: 3.6rem;
    height: 3.6rem;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--fx-brace);
    margin-bottom: .6rem;
    box-shadow: 0 4px 18px rgba(232, 86, 42, .5);
}
.fx-comb-tondo {
    position: absolute;
    width: 2.8rem;
    height: 2.8rem;
    border-radius: 50%;
    border: 0;
    background: rgba(0, 0, 0, .5);
    color: #fff;
    font-size: 1.25rem;
    display: grid;
    place-items: center;
    backdrop-filter: blur(6px);
    flex-shrink: 0;
}
.fx-comb-tondo.position-static { background: rgba(255, 255, 255, .1); }

/* dettaglio: in verticale foto sopra e testo sotto, in orizzontale foto a sinistra e testo a destra */
.fx-comb-dettaglio {
    min-height: 100%;
    display: grid;
    grid-template-rows: auto 1fr auto;
}
.fx-comb-dettaglio-foto { position: relative; background: #000; }
.fx-comb-dettaglio-foto img {
    display: block;
    width: 100%;
    height: 58vh;
    object-fit: cover;
}
.fx-comb-chiudi { top: max(1rem, env(safe-area-inset-top)); left: 1rem; }
.fx-comb-prec { top: 50%; left: 1rem; transform: translateY(-50%); }
.fx-comb-succ { top: 50%; right: 1rem; transform: translateY(-50%); }
.fx-comb-contatore {
    position: absolute;
    right: 1rem;
    bottom: 1rem;
    background: rgba(0, 0, 0, .5);
    border-radius: 999px;
    padding: .2rem .7rem;
    font-size: .85rem;
}
.fx-comb-dettaglio-testo { padding: 1.5rem; max-width: 760px; width: 100%; margin: 0 auto; }
.fx-comb-titolo { display: flex; align-items: baseline; flex-wrap: wrap; gap: .25rem .75rem; }
.fx-comb-titolo h2 { font-size: clamp(2rem, 5vw, 3rem); margin: 0; }
.fx-comb-variante {
    border: 1px solid rgba(255, 255, 255, .35);
    border-radius: 999px;
    padding: .1rem .75rem;
    color: #e2dbd1;
}
.fx-comb-frase { font-size: 1.15rem; line-height: 1.5; color: #d9d2c8; margin: .9rem 0 0; font-style: italic; }
.fx-comb-nota {
    margin-top: 1rem;
    padding: .6rem .8rem;
    border-radius: 10px;
    background: rgba(245, 158, 11, .14);
    color: #f8d58c;
    font-size: .95rem;
}
.fx-comb-sezione {
    margin: 1.6rem 0 .6rem;
    font-size: .75rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: #9d968c;
}
.fx-comb-superfici { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: .75rem; }
.fx-comb-superficie { display: flex; align-items: center; gap: .75rem; }
.fx-comb-superficie img {
    width: 64px;
    height: 64px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .5);
}
.fx-comb-ruolo { font-size: .8rem; color: #9d968c; }
.fx-comb-nome-piastrella { line-height: 1.25; }
.fx-comb-formato { font-size: .8rem; color: #b9b2a8; }
.fx-comb-prodotti { margin: 0; }
.fx-comb-prodotto {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: .55rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.fx-comb-prodotto dt { font-weight: 400; color: #9d968c; white-space: nowrap; }
.fx-comb-prodotto dd { margin: 0; text-align: right; }
.fx-comb-spenta { opacity: .38; }
.fx-comb-azioni {
    position: sticky;
    bottom: 0;
    display: flex;
    gap: .75rem;
    padding: .9rem 1.5rem max(.9rem, env(safe-area-inset-bottom));
    background: linear-gradient(to top, #111 70%, rgba(17, 17, 17, 0));
}
@media (orientation: landscape) and (min-width: 900px) {
    .fx-comb-dettaglio {
        height: 100%;
        grid-template-columns: minmax(0, 1.5fr) minmax(360px, 1fr);
        grid-template-rows: 1fr auto;
    }
    .fx-comb-dettaglio-foto { grid-row: 1 / 3; }
    .fx-comb-dettaglio-foto img { height: 100vh; }
    .fx-comb-dettaglio-testo { overflow-y: auto; max-width: none; }
    .fx-comb-azioni { position: static; background: #111; }
}

/* riquadro "Ambiente" nei desideri */
.fx-comb-riquadro {
    display: flex;
    align-items: center;
    gap: .75rem;
    width: 100%;
    padding: .5rem;
    border: 1px solid var(--bs-border-color);
    border-radius: 12px;
    background: var(--bs-body-bg);
    color: inherit;
    text-align: left;
}
.fx-comb-riquadro img, .fx-comb-riquadro .fx-comb-riquadro-vuoto {
    width: 96px;
    height: 66px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}
.fx-comb-riquadro-vuoto {
    display: grid;
    place-items: center;
    background: var(--bs-tertiary-bg);
    font-size: 1.5rem;
    color: var(--fx-ambra);
}

/* Stile scuro del Bagno da foto (procedura e scheda della proposta), come la galleria degli ambienti:
   Bootstrap in tema scuro (data-bs-theme="dark") più fondo quasi nero, titoli con grazie e accento brace */
.fx-scuro {
    --bs-body-bg: #111;
    --bs-body-color: #f4f1ec;
    --bs-secondary-color: #b9b2a8;
    --bs-tertiary-bg: #1d1b19;
    --bs-border-color: rgba(255, 255, 255, .12);
    --bs-card-bg: #171513;
    --bs-primary: var(--fx-brace);
    --bs-primary-rgb: 232, 86, 42;
    --bs-link-color: #ff9a74;
    background: #111;
    color: #f4f1ec;
}
.fx-scuro .card { --bs-card-bg: #1a1816; --bs-card-border-color: rgba(255, 255, 255, .08); border-radius: 14px; }
.fx-scuro h1, .fx-scuro h2, .fx-scuro .h5 {
    font-family: Georgia, "Times New Roman", serif;
    font-weight: 400;
    letter-spacing: .01em;
}
.fx-scuro h2.h5 { font-size: 1.6rem; }
.fx-scuro .text-muted { color: #9d968c !important; }
.fx-scuro .small.fw-semibold { color: #d9d2c8; letter-spacing: .02em; }
.fx-scuro .btn-outline-primary {
    --bs-btn-color: #f4f1ec;
    --bs-btn-border-color: rgba(255, 255, 255, .22);
    --bs-btn-hover-bg: rgba(232, 86, 42, .18);
    --bs-btn-hover-border-color: var(--fx-brace);
    --bs-btn-hover-color: #fff;
    --bs-btn-active-bg: var(--fx-brace);
    --bs-btn-active-border-color: var(--fx-brace);
}
.fx-scuro .btn-group > .btn { padding-top: .55rem; padding-bottom: .55rem; }
.fx-scuro .btn-outline-secondary { --bs-btn-color: #d9d2c8; --bs-btn-border-color: rgba(255, 255, 255, .25); }
.fx-scuro .form-control, .fx-scuro .input-group-text { background: #1d1b19; border-color: rgba(255, 255, 255, .15); color: #f4f1ec; }
.fx-scuro .form-control:focus { border-color: var(--fx-brace); box-shadow: 0 0 0 .2rem rgba(232, 86, 42, .25); }
.fx-scuro .fx-bagno-testa, .fx-scuro .fx-bagno-piede { background: #111; border-color: rgba(255, 255, 255, .08) !important; }
.fx-bagno.fx-scuro { background: #111; }
.fx-proposta { box-shadow: 0 8px 30px rgba(0, 0, 0, .25); }

/* l'ambiente scelto nei desideri: foto grande con nome, tocco per aprire la galleria */
.fx-comb-scelto {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 29 / 14;
    padding: 0;
    border: 0;
    border-radius: 14px;
    overflow: hidden;
    background: #222;
    color: #fff;
    text-align: left;
    box-shadow: 0 6px 24px rgba(0, 0, 0, .35);
}
.fx-comb-scelto > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.fx-comb-cambia {
    position: absolute;
    top: .75rem;
    right: .75rem;
    background: rgba(0, 0, 0, .55);
    backdrop-filter: blur(6px);
    border-radius: 999px;
    padding: .3rem .8rem;
    font-size: .9rem;
}

/* Connessione caduta con il planner aperto (Components/Layout/ReconnectModal.razor.js): etichetta che non blocca lo schermo */
html.fx-senza-rete::after,
html.fx-sessione-scaduta::after {
    position: fixed; top: .5rem; left: 50%; transform: translateX(-50%); z-index: 2000;
    padding: .35rem .9rem; border-radius: 999px; font-size: .85rem; pointer-events: none;
    background: var(--fx-ambra); color: #1B1210; box-shadow: 0 2px 8px rgba(0,0,0,.3);
    content: "Senza rete · il planner continua, salvo appena torna";
}
html.fx-sessione-scaduta::after {
    content: "Sessione scaduta · salvo il progetto e ricarico";
}

/* Progetto bagno: proposte e progetti del planner affiancati sul tablet in orizzontale, per confrontarli col cliente */
@media (min-width: 992px) {
    .fx-bagno-corpo:has(.fx-varianti) { max-width: 1180px; }
    .fx-varianti { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1.5rem; align-items: start; }
}


/* Regole comuni di usabilità (verifica UI/UX del 22/11/2026, skill ui-ux-pro-max): al telefono ogni cosa da toccare è
   alta almeno 44 px e i campi hanno il testo a 16 px (sotto, l'iPhone ingrandisce la pagina quando li tocchi);
   caselle e interruttori più grandi; le etichette di stato non scendono sotto i 12 px. */
.badge { font-size: max(.75em, 12px); }
.btn, a, [role="button"], .form-check-input { touch-action: manipulation; }
@media (max-width: 767.98px) {
    .form-control, .form-select, .form-control-sm, .form-select-sm, .input-group-text { font-size: 16px; }
    .form-control:not(textarea), .form-select, .form-control-sm:not(textarea), .form-select-sm { min-height: 44px; }
    .btn, .btn-sm, .btn-group > .btn, .btn-group-sm > .btn { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: .25rem; }
    .btn:has(> .bi:only-child), .btn-sm:has(> .bi:only-child) { min-width: 44px; }
    .form-check-input { width: 1.4em; height: 1.4em; margin-top: .1em; }
    .form-switch .form-check-input { width: 2.6em; height: 1.5em; }
    .form-check { min-height: 44px; display: flex; align-items: center; gap: .5rem; padding-left: 0; }
    .form-check .form-check-input { float: none; margin-left: 0; }
}


/* Disponibilità (22/11/2026, come nell'app): settimane, un giorno per riga toccabile, foglio delle scelte */
.fx-riepilogo-scelto { border: 2px solid var(--fx-brace, #E8562A) !important; }
.fx-scelta-settimana { display: flex; background: #F1E9E3; border-radius: 14px; padding: 4px; }
.fx-scelta-settimana button { flex: 1; border: 0; background: transparent; border-radius: 11px; padding: .5rem .25rem; display: flex; flex-direction: column; align-items: center; color: #8A766D; font-weight: 600; min-height: 52px; }
.fx-scelta-settimana button small { font-weight: 400; font-size: 13px; }
.fx-scelta-settimana button.attiva { background: #fff; color: #231815; box-shadow: 0 1px 4px rgba(58, 22, 17, .12); }
.fx-giorni { border-radius: 16px; overflow: hidden; }
.fx-giorno { display: flex; align-items: center; gap: 1rem; min-height: 64px; padding: .5rem 1rem; text-align: left; }
.fx-giorno:disabled { opacity: 1; }
.fx-giorno.fx-giorno-passato { opacity: .45; }
.fx-giorno-data { width: 2.6rem; display: flex; flex-direction: column; align-items: center; line-height: 1.1; }
.fx-giorno-data strong { font-size: 1.35rem; }
.fx-giorno-data small { font-size: 13px; color: #8A766D; text-transform: uppercase; font-weight: 600; }
.fx-giorno-data.oggi strong { color: var(--fx-brace, #E8562A); }
.fx-giorno-stato { flex: 1; display: flex; flex-wrap: wrap; gap: .25rem 1rem; }
.fx-fascia { display: inline-flex; align-items: center; gap: .5rem; font-weight: 700; font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.fx-pallino { display: inline-block; width: 8px; height: 8px; border-radius: 50%; flex: 0 0 8px; }
.fx-pallino.si { background: #2E9F5B; }
.fx-pallino.no { background: #E0533A; }
.fx-aggiungi { color: #C2410C; font-weight: 700; }
.fx-opzione { display: flex; align-items: center; gap: .75rem; min-height: 56px; }
.fx-opzione.scelta { background: #FBF6F2; }
@media (max-width: 767.98px) {
    .fx-foglio-giorno .modal-dialog { position: fixed; left: 0; right: 0; bottom: 0; margin: 0; max-width: none; min-height: 0; align-items: flex-end; }
    .fx-foglio-giorno .modal-content { border-radius: 20px 20px 0 0; border: 0; padding-bottom: env(safe-area-inset-bottom); }
}


/* Titoli delle pagine al telefono: un po' più piccoli e senza l'icona davanti, così stanno su una riga */
@media (max-width: 767.98px) {
    h1.display-6 { font-size: 1.75rem; }
    h1.display-6 > .bi:first-child { display: none; }
}

/* Bagno da foto: scelte che vanno a capo, testo che non tocca i bordi (Predisposizione) */
.fx-scuro .btn-group.flex-wrap > .btn { padding-left: .5rem; padding-right: .5rem; overflow-wrap: anywhere; }

/* Caricamenti lunghi dal CRM (InCaricamento.razor): Kraken compare solo se dopo 3 secondi si sta ancora caricando */
.fx-dopo-poco { animation: fx-compari .3s ease 3s both; }
.fx-dopo-poco .fx-kraken { text-align: left; max-width: 32rem; }
@keyframes fx-compari { from { opacity: 0; visibility: hidden; } to { opacity: 1; visibility: visible; } }

/* Pop up "Disponibilità da inserire" (Layout/AvvisoDisponibilita.razor, fenix.avvisoDisponibilita): sopra a tutto, al centro;
   al telefono la scheda sta in basso, con i pulsanti vicino al pollice */
.fx-avviso-dispo {
    position: fixed;
    inset: 0;
    z-index: 1090;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(27, 18, 16, .55);
}

.fx-avviso-dispo[hidden] { display: none; }

.fx-avviso-dispo-scheda {
    width: 100%;
    max-width: 28rem;
    background: var(--bs-body-bg);
    color: var(--bs-body-color);
    border: 1px solid var(--bs-border-color);
    border-radius: 1.25rem;
    padding: 1.5rem;
    box-shadow: 0 1rem 2.5rem rgba(27, 18, 16, .35);
}

.fx-avviso-dispo-azione { min-height: 48px; display: flex; align-items: center; justify-content: center; font-weight: 600; }

html.fx-avviso-aperto { overflow: hidden; }

@media (max-width: 575.98px) {
    .fx-avviso-dispo { align-items: flex-end; padding: 0; }
    .fx-avviso-dispo-scheda { max-width: none; border-radius: 1.25rem 1.25rem 0 0; padding-bottom: calc(1.5rem + env(safe-area-inset-bottom)); }
}

/* Campanella delle notifiche (Layout/Campanella.razor): sul computer a destra nella barra in alto, al telefono
   nell'intestazione scura accanto al pulsante del menu; il pallino conta le nuove */
.fx-campanella {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    font-size: 1.3rem;
    text-decoration: none !important;
}

.fx-campanella-numero {
    position: absolute;
    top: 4px;
    right: 2px;
    min-width: 1.2rem;
    height: 1.2rem;
    padding: 0 .3rem;
    border-radius: .6rem;
    background: var(--fx-brace);
    color: #fff;
    font-size: .72rem;
    font-weight: 700;
    line-height: 1.2rem;
    text-align: center;
}

.top-row .fx-campanella-pc {
    margin-left: auto !important;
    color: var(--fx-brace-scura);
}

.top-row .fx-campanella-pc:hover { background: var(--fx-crema); color: var(--fx-brace); }

.fx-campanella-tel {
    position: absolute;
    top: .5rem;
    right: 5rem;
    z-index: 2;
    color: rgba(255, 255, 255, .85);
    background: rgba(255, 255, 255, .1);
    height: 2.5rem;
    width: 2.75rem;
}

@media (min-width: 641px) {
    .fx-campanella-tel { display: none; }
}

.fx-pagina-notifiche { max-width: 48rem; }
.fx-notifica-nuova::before { content: ""; display: inline-block; width: .55rem; height: .55rem; border-radius: 50%; background: var(--fx-brace); margin-right: .45rem; vertical-align: middle; }
.fx-notifiche-pagina > * { display: inline-flex; align-items: center; min-height: 44px; }

/* Captcha del login (ALTCHA, 25/11/2026): con i colori di Fenix, largo come il modulo */
altcha-widget {
    display: block;
    width: 100%;
    --altcha-max-width: 100%;
    --altcha-color-primary: var(--fx-brace);
    --altcha-color-success: var(--fx-brace);
    --altcha-color-base: var(--bs-body-bg, #fff);
    --altcha-color-base-content: var(--bs-body-color, #212529);
    --altcha-border-color: var(--bs-border-color, #dee2e6);
    --altcha-border-radius: var(--bs-border-radius-lg, .5rem);
    --altcha-shadow: none;
}
