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;
}

.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;
}

:root,
[data-bs-theme="dark"] {
    --bs-focus-ring-width: 0px;
    --bs-focus-ring-opacity: 0;
    --bs-focus-ring-color: transparent;
}

/* Regola globale: nessun bordo blu evidenziato o focus ring su caselle, pulsanti e tab al click/selezione */
a:focus, a:focus-visible,
.btn:focus, .btn:active, .btn:focus-visible, .btn:active:focus, .btn.active, .btn.show,
.btn-check:focus + .btn, .btn-check:focus-visible + .btn, .btn-check:checked + .btn:focus, .btn-check:checked + .btn:focus-visible,
button:focus, button:active, button:focus-visible,
.nav-link:focus, .nav-link:active, .nav-link:focus-visible,
.btn-close:focus, .btn-close:active, .btn-close:focus-visible,
.page-link:focus, .page-link:focus-visible, .page-link:active,
.accordion-button:focus, .accordion-button:focus-visible,
.dropdown-item:focus, .dropdown-item:focus-visible,
.list-group-item-action:focus, .list-group-item-action:focus-visible,
input:focus, input:focus-visible,
select:focus, select:focus-visible,
textarea:focus, textarea:focus-visible,
.form-control:focus, .form-control:focus-visible, .form-control:active,
.form-control-plaintext:focus, .form-control-plaintext:focus-visible,
.form-select:focus, .form-select:focus-visible, .form-select:active,
.form-check-input:focus, .form-check-input:focus-visible, .form-check-input:active,
.form-range:focus, .form-range:focus-visible,
[role="button"]:focus, [role="button"]:focus-visible,
[role="tab"]:focus, [role="tab"]:focus-visible,
[tabindex]:focus, [tabindex]:focus-visible {
    box-shadow: none !important;
    outline: none !important;
}

.form-range:focus::-webkit-slider-thumb,
.form-range:focus-visible::-webkit-slider-thumb,
.form-range:focus::-moz-range-thumb,
.form-range:focus-visible::-moz-range-thumb {
    box-shadow: none !important;
    outline: none !important;
}

.form-control:not(.is-valid):not(.is-invalid):not(.border-success):not(.border-danger):not(.border-warning):not(.border-secondary):not(.border-secondary-subtle):not(.border-0):focus,
.form-control:not(.is-valid):not(.is-invalid):not(.border-success):not(.border-danger):not(.border-warning):not(.border-secondary):not(.border-secondary-subtle):not(.border-0):focus-visible,
.form-select:not(.is-valid):not(.is-invalid):not(.border-success):not(.border-danger):not(.border-warning):not(.border-secondary):not(.border-secondary-subtle):not(.border-0):focus,
.form-select:not(.is-valid):not(.is-invalid):not(.border-success):not(.border-danger):not(.border-warning):not(.border-secondary):not(.border-secondary-subtle):not(.border-0):focus-visible,
.form-select:not(.is-valid):not(.is-invalid):not(.border-success):not(.border-danger):not(.border-warning):not(.border-secondary):not(.border-secondary-subtle):not(.border-0):active {
    border-color: var(--bs-border-color) !important;
}

.form-check-input:not(:checked):not(.darker-border-checkbox):not(.is-valid):not(.is-invalid):not(.border-success):not(.border-danger):focus,
.form-check-input:not(:checked):not(.darker-border-checkbox):not(.is-valid):not(.is-invalid):not(.border-success):not(.border-danger):focus-visible {
    border-color: var(--bs-border-color) !important;
}

.form-check-input.darker-border-checkbox:not(:checked):focus,
.form-check-input.darker-border-checkbox:not(:checked):focus-visible {
    border-color: #929292 !important;
}

.badge-prio-modifiche {
    background-color: #0f766e !important;
    color: #ffffff !important;
}

@media (min-width: 992px) {
    .prio-modifiche-divider {
        border-right: 1px dashed rgba(15, 118, 110, 0.4);
        padding-right: 0.85rem;
    }
}

@media (max-width: 991.98px) {
    .prio-modifiche-divider {
        border-bottom: 1px dashed rgba(15, 118, 110, 0.35);
        padding-bottom: 0.75rem;
    }
}

/* --- KPI CARD TOPBAR PORTALE CLIENTI (Coerenti con SiteLog, adattate allo sfondo blu navy) --- */
.portal-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.5rem;
    width: 100%;
    max-width: 580px;
}

@media (max-width: 575.98px) {
    .portal-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        max-width: none;
    }
}

.portal-kpi-card {
    appearance: none;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 100%;
    padding: 0.45rem 0.75rem;
    border-radius: 0.85rem;
    border: 1px solid rgba(255, 255, 255, 0.28);
    background: rgba(12, 26, 54, 0.38);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #ffffff;
    text-align: left;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(10, 22, 48, 0.18);
    transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.portal-kpi-card:hover {
    border-color: rgba(255, 255, 255, 0.62);
    background: rgba(12, 26, 54, 0.50);
    transform: translateY(-2px);
    box-shadow: 0 0.35rem 0.9rem rgba(10, 22, 48, 0.28);
    color: #ffffff;
}

.portal-kpi-card:focus,
.portal-kpi-card:focus-visible,
.portal-kpi-card:active {
    outline: none !important;
    box-shadow: 0 2px 10px rgba(10, 22, 48, 0.18) !important;
}

.portal-kpi-label {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.84);
    line-height: 1.15;
}

.portal-kpi-value {
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1;
    color: #ffffff;
    margin-top: 0.2rem;
}

.portal-kpi-icon {
    width: 26px;
    height: 26px;
    border-radius: 0.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.84rem;
    line-height: 1;
    flex-shrink: 0;
}

.portal-soft-neutral {
    background-color: rgba(255, 255, 255, 0.16);
    color: #f8fafc;
}

.portal-soft-primary {
    background-color: rgba(56, 189, 248, 0.22);
    color: #7dd3fc;
}

.portal-soft-warning {
    background-color: rgba(255, 193, 7, 0.22);
    color: #ffda6a;
}

.portal-soft-success {
    background-color: rgba(34, 197, 94, 0.24);
    color: #86efac;
}

.portal-kpi-card.portal-kpi-selected-neutral {
    border-color: rgba(255, 255, 255, 0.88);
    background: linear-gradient(rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.14)), rgba(12, 26, 54, 0.48);
    box-shadow: 0 0.3rem 0.9rem rgba(10, 22, 48, 0.28);
}

.portal-kpi-card.portal-kpi-selected-primary {
    border-color: #7dd3fc;
    background: linear-gradient(rgba(56, 189, 248, 0.18), rgba(56, 189, 248, 0.18)), rgba(12, 26, 54, 0.48);
    box-shadow: 0 0.3rem 0.9rem rgba(10, 22, 48, 0.28);
}

.portal-kpi-card.portal-kpi-selected-warning {
    border-color: #ffda6a;
    background: linear-gradient(rgba(255, 193, 7, 0.16), rgba(255, 193, 7, 0.16)), rgba(12, 26, 54, 0.48);
    box-shadow: 0 0.3rem 0.9rem rgba(10, 22, 48, 0.28);
}

.portal-kpi-card.portal-kpi-selected-success {
    border-color: #86efac;
    background: linear-gradient(rgba(34, 197, 94, 0.18), rgba(34, 197, 94, 0.18)), rgba(12, 26, 54, 0.48);
    box-shadow: 0 0.3rem 0.9rem rgba(10, 22, 48, 0.28);
}

@media (prefers-reduced-motion: reduce) {
    .portal-kpi-card {
        transition: border-color 0.15s ease, background 0.15s ease;
    }

    .portal-kpi-card:hover {
        transform: none;
    }
}

@media (forced-colors: active) {
    .portal-kpi-card {
        border: 1px solid ButtonText;
    }

    .portal-kpi-card[aria-pressed="true"] {
        border: 2px solid Highlight !important;
    }
}

/* Pulsante CTA arancione unificato "Nuovo Ticket" */
.btn-new-ticket-yellow {
    background-color: #f39221;
    color: #ffffff;
    border: 1px solid #e08316;
    box-shadow: 0 2px 8px rgba(243, 146, 33, 0.30);
    transition: transform 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

.btn-new-ticket-yellow:hover {
    background-color: #ff9f2e !important;
    border-color: #e08316 !important;
    color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(243, 146, 33, 0.45) !important;
}

@media (prefers-reduced-motion: reduce) {
    .btn-new-ticket-yellow:hover {
        transform: none;
    }
}

/* Stato attesa traduzione AI (preserva grafica a riposo, cursore wait) */
.portal-btn-translating,
.portal-btn-translating:disabled {
    opacity: 0.85 !important;
    pointer-events: auto !important;
    cursor: wait !important;
}

/* --- WIZARD NUOVO TICKET (AI-First 4 step orizzontale) --- */
.wizard-shell {
    max-width: 1400px;
    margin: 0 auto;
}

.wizard-card {
    display: flex;
    flex-direction: column;
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 1.25rem;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

@media (min-width: 992px) {
    .wizard-card {
        height: calc(100vh - 196px);
        height: calc(100dvh - 196px);
        min-height: 400px;
        max-height: 820px;
        overflow: hidden;
    }
}

.wizard-card-header {
    flex-shrink: 0;
    background-color: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    border-top-left-radius: calc(1.25rem - 1px);
    border-top-right-radius: calc(1.25rem - 1px);
    padding: 0.9rem 1.5rem;
}

.wizard-card-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
    padding: 1.35rem 1.75rem;
}

.wizard-card-body::-webkit-scrollbar {
    width: 6px;
}

.wizard-card-body::-webkit-scrollbar-thumb {
    background-color: #cbd5e1;
    border-radius: 999px;
}

.wizard-card-footer {
    flex-shrink: 0;
    background-color: #f8fafc;
    border-top: 1px solid #e2e8f0;
    border-bottom-left-radius: calc(1.25rem - 1px);
    border-bottom-right-radius: calc(1.25rem - 1px);
    padding: 0.9rem 1.75rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
}

@media (max-width: 991.98px) {
    .wizard-card-footer {
        position: sticky;
        bottom: 0;
        z-index: 5;
    }
}

.wizard-stepper {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
    width: 100%;
    gap: 0.75rem;
}

.wizard-step-item {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.wizard-step-item.has-connector {
    flex: 1 1 0%;
}

.wizard-step-item:last-child {
    flex: 0 0 auto;
}

.wizard-step-trigger {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.45rem 0.85rem 0.45rem 0.5rem;
    border-radius: 999px;
    border: 1.5px solid transparent;
    background-color: transparent;
    color: #64748b;
    text-align: left;
    flex-shrink: 0;
    transition: border-color 0.18s ease, background-color 0.18s ease, color 0.18s ease;
}

button.wizard-step-trigger {
    cursor: pointer;
}

button.wizard-step-trigger:hover:not(:disabled) {
    border-color: rgba(38, 176, 80, 0.4);
    background-color: #f0fdf4;
    color: #0f172a;
}

button.wizard-step-trigger:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.wizard-step-trigger.is-active {
    border-color: rgba(13, 110, 253, 0.35);
    background-color: #eff6ff;
    color: #0f172a;
    box-shadow: 0 2px 8px rgba(13, 110, 253, 0.08);
}

.wizard-step-trigger.is-done {
    color: #1e293b;
}

.wizard-step-trigger.is-todo {
    color: #64748b;
}

.wizard-step-circle {
    width: 30px;
    height: 30px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.84rem;
    font-weight: 700;
    flex-shrink: 0;
    background-color: #ffffff;
    border: 1.5px solid #cbd5e1;
    color: #64748b;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.wizard-step-trigger.is-active .wizard-step-circle {
    background-color: #0d6efd;
    border-color: #0d6efd;
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(13, 110, 253, 0.28);
}

.wizard-step-trigger.is-done .wizard-step-circle {
    background-color: #26b050;
    border-color: #26b050;
    color: #ffffff;
}

.wizard-step-title {
    font-size: 0.88rem;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
}

.wizard-step-connector {
    flex: 1 1 0%;
    min-width: 18px;
    height: 3px;
    border-radius: 999px;
    background-color: #e2e8f0;
    overflow: hidden;
}

.wizard-step-connector-fill {
    width: 100%;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #26b050 0%, #0d6efd 100%);
    transform-origin: left center;
    transform: scaleX(0);
}

.wizard-step-connector-fill.is-filled {
    transform: scaleX(1);
}

.wizard-side-panel {
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    padding: 1.25rem 1.35rem;
}

.wizard-dropzone {
    border: 1.5px dashed #cbd5e1;
    border-radius: 1rem;
    background-color: #f8fafc;
    padding: 2rem 1.5rem;
    text-align: center;
}

.wizard-file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.7rem 0.9rem;
    border-radius: 0.75rem;
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
}

.wizard-fieldset-legend {
    float: none;
    width: auto;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #64748b;
    margin-bottom: 0.75rem;
    padding: 0;
}

.wizard-btn-secondary {
    background-color: #ffffff;
    color: #475569;
    border: 1px solid #cbd5e1;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.wizard-btn-secondary:hover,
.wizard-btn-secondary:active {
    background-color: #f1f5f9 !important;
    color: #0f172a !important;
    border-color: #94a3b8 !important;
}

.wizard-btn-secondary:disabled,
.wizard-btn-secondary.disabled {
    opacity: 0.6;
    pointer-events: none;
}

@media (max-width: 991.98px) {
    .wizard-step-title {
        white-space: normal;
        font-size: 0.82rem;
    }
}

@media (max-width: 767.98px) {
    .wizard-card-header {
        padding: 0.85rem 1rem;
    }

    .wizard-card-body {
        padding: 1.25rem 1.15rem;
    }

    .wizard-card-footer {
        padding: 1rem 1.15rem;
    }

    .wizard-stepper {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.55rem;
    }

    .wizard-step-item.has-connector,
    .wizard-step-item:last-child {
        flex: initial;
    }

    .wizard-step-connector {
        display: none;
    }

    .wizard-step-trigger {
        width: 100%;
        min-height: 46px;
        gap: 0.55rem;
        padding: 0.5rem 0.7rem;
        border-radius: 0.85rem;
        background-color: #ffffff;
        border-color: #e2e8f0;
    }

    .wizard-step-trigger.is-done {
        border-color: rgba(38, 176, 80, 0.45);
    }

    .wizard-step-circle {
        width: 26px;
        height: 26px;
        font-size: 0.78rem;
    }

    .wizard-step-title {
        font-size: 0.8rem;
    }
}

/* Pillole / Card cliccabili Reparto */
.wizard-reparto-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-auto-rows: 1fr;
    gap: 0.9rem;
}

@media (max-width: 991.98px) {
    .wizard-reparto-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 575.98px) {
    .wizard-reparto-grid {
        grid-template-columns: 1fr;
    }
}

.wizard-reparto-btn {
    width: 100%;
    height: 100%;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    min-height: 84px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.9rem 1rem;
    border-radius: 0.85rem;
    border: 1.5px solid #dee2e6;
    background-color: #f8fafc;
    color: #1e293b;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.15s ease, background-color 0.15s ease, transform 0.15s ease;
}

.wizard-reparto-btn:hover {
    border-color: #94a3b8;
    background-color: #ffffff;
    transform: translateY(-1px);
}

.wizard-reparto-btn[aria-pressed="true"] {
    border-color: #26b050 !important;
    background-color: rgba(38, 176, 80, 0.08) !important;
    color: #0f172a;
}

/* Griglia uniforme e pulsanti accessibili per Card Tipologia/Priorità */
.wizard-prio-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.85rem;
    align-items: stretch;
}

@media (min-width: 1400px) {
    .wizard-prio-layout {
        grid-template-columns: minmax(225px, 1.18fr) minmax(0, 3fr);
    }
}

.wizard-prio-tech-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-auto-rows: 1fr;
    gap: 0.9rem;
    width: 100%;
    height: 100%;
}

@media (max-width: 767.98px) {
    .wizard-prio-tech-grid {
        grid-template-columns: 1fr;
    }
}

.wizard-prio-btn {
    width: 100%;
    height: 100%;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    min-height: 154px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 0.7rem;
    text-align: left;
    cursor: pointer;
    background-color: #f8f9fa;
    border: 1.5px solid rgba(108, 117, 125, 0.25);
    border-radius: 0.85rem;
    padding: 0.95rem 1rem;
    transition: border-color 0.15s ease, background-color 0.15s ease, transform 0.15s ease;
}

@media (max-width: 767.98px) {
    .wizard-prio-btn {
        min-height: 128px;
    }
}

.wizard-prio-btn:hover {
    transform: translateY(-1px);
}

.wizard-prio-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 0.5rem;
    width: 100%;
    min-width: 0;
}

.wizard-prio-title-group {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    min-width: 0;
}

.wizard-prio-title {
    min-width: 0;
    flex: 1 1 0%;
    overflow-wrap: anywhere;
    word-break: break-word;
}

@media (min-width: 1400px) {
    .wizard-prio-modifiche-divider {
        border-right: 1px dashed rgba(15, 118, 110, 0.4);
        padding-right: 0.85rem;
    }
}

@media (max-width: 1399.98px) {
    .wizard-prio-modifiche-divider {
        border-bottom: 1px dashed rgba(15, 118, 110, 0.35);
        padding-bottom: 1rem;
    }
}

/* Badge confidenza AI */
.wizard-ai-badge-high {
    background-color: #eef2ff;
    color: #3730a3;
    border: 1px solid #c7d2fe;
    font-size: 0.72rem;
    font-weight: 600;
    white-space: normal !important;
    text-align: left;
    line-height: 1.25;
    max-width: 100%;
    overflow-wrap: break-word;
    border-radius: 0.65rem;
}

.wizard-ai-badge-low {
    background-color: #fffbeb;
    color: #92400e;
    border: 1px solid #fde68a;
    font-size: 0.72rem;
    font-weight: 600;
    white-space: normal !important;
    text-align: left;
    line-height: 1.25;
    max-width: 100%;
    overflow-wrap: break-word;
    border-radius: 0.65rem;
}

.wizard-step-heading:focus {
    outline: none !important;
    box-shadow: none !important;
}

.wizard-step-pane {
    width: 100%;
}

@media (prefers-reduced-motion: no-preference) {
    .wizard-step-connector-fill {
        transition: transform 0.38s cubic-bezier(0.22, 1, 0.36, 1);
    }

    @keyframes wizardSlideInRight {
        from {
            opacity: 0;
            transform: translate3d(28px, 0, 0);
        }
        to {
            opacity: 1;
            transform: translate3d(0, 0, 0);
        }
    }

    @keyframes wizardSlideInLeft {
        from {
            opacity: 0;
            transform: translate3d(-28px, 0, 0);
        }
        to {
            opacity: 1;
            transform: translate3d(0, 0, 0);
        }
    }

    @keyframes wizardCheckPop {
        0% {
            transform: scale(0.55);
        }
        70% {
            transform: scale(1.14);
        }
        100% {
            transform: scale(1);
        }
    }

    @keyframes wizardResultsFadeIn {
        from {
            opacity: 0;
            transform: translate3d(0, 8px, 0);
        }
        to {
            opacity: 1;
            transform: translate3d(0, 0, 0);
        }
    }

    .wizard-step-enter-forward {
        animation: wizardSlideInRight 0.30s cubic-bezier(0.22, 1, 0.36, 1) both;
    }

    .wizard-step-enter-backward {
        animation: wizardSlideInLeft 0.30s cubic-bezier(0.22, 1, 0.36, 1) both;
    }

    .wizard-step-circle.is-check-pop {
        animation: wizardCheckPop 0.30s cubic-bezier(0.34, 1.56, 0.64, 1) both;
    }

    .wizard-ai-results-enter {
        animation: wizardResultsFadeIn 0.26s cubic-bezier(0.22, 1, 0.36, 1) both;
    }
}

@media (prefers-reduced-motion: reduce) {
    .wizard-step-trigger,
    .wizard-reparto-btn,
    .wizard-prio-btn {
        transition: border-color 0.15s ease, background-color 0.15s ease;
    }

    button.wizard-step-trigger:hover,
    .wizard-reparto-btn:hover,
    .wizard-prio-btn:hover {
        transform: none;
    }
}


