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;
}


/* GFT Commission Manager - Stili CSS Personalizzati */

/* Reset e normalizziazione di base */
html, body {
    font-family: 'Roboto', 'Segoe UI', system-ui, sans-serif;
    margin: 0;
    padding: 0;
    height: 100%;
    color: rgba(0, 0, 0, 0.87);
}

/* ===== LAYOUT GENERALE ===== */

/* Logo e spazio per logo */
.logo-space {
    height: 36px;
    width: 120px;
    margin-right: 16px;
}

.company-logo {
    height: 30px;
    margin-right: 15px;
}

.logo-container {
    display: flex;
    align-items: center;
    margin-right: 10px;
}

.drawer-header {
    display: flex;
    justify-content: center;
    padding: 16px 0;
    border-bottom: 1px solid rgba(0,0,0,0.12);
}

.company-logo-drawer {
    height: 50px;
}

/* Contenuto principale */
.main-content {
    padding: 16px;
    margin-top:20px;
}

/* Classi di spaziatura compatta */
.gft-compact-spacing {
    --mud-spacing: 8px;
}

.gft-compact-grid {
    --mud-grid-spacing: 1;
}

/* Dimensione ottimale per dialog */
.gft-dialog-size {
   /* min-width: 400px !important;*/
}

/* ===== COMPONENTI MUDBLAZOR ===== */

/* MudPaper */
.gft-paper {
    padding: 16px;
    margin-bottom: 16px;
    border-radius: 4px;
}

/* Compattazione dei form */
.gft-compact-form .mud-input {
    margin-top: 8px;
    margin-bottom: 8px;
}

/* Formattazione delle table */
.gft-table thead th {
    font-weight: 500;
    color: rgba(0, 0, 0, 0.77);
}

.gft-table tbody td {
    padding-top: 8px;
    padding-bottom: 8px;
}

/* Formattazione delle tabs */
.gft-tabs .mud-tabs-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.12);
}

/* Fix per l'indicatore di tab selezionata nei dialog */
.mud-dialog .mud-tabs .mud-tabs-toolbar .mud-tabs-indicator,
.mud-dialog .mud-tabs-panels .mud-tabs .mud-tabs-toolbar .mud-tabs-indicator {
    bottom: 0 !important;
    position: absolute !important;
    height: 2px !important;
    transform: none !important;
    transition: left 300ms cubic-bezier(0.4, 0, 0.2, 1) 0ms, width 300ms cubic-bezier(0.4, 0, 0.2, 1) 0ms !important;
}

/* Stile del NavMenu */
.gft-navmenu {
    padding-top: 8px;
}

    .gft-navmenu .mud-navgroup-title {
        padding-left: 16px;
        padding-top: 16px;
        font-weight: 500;
    }

    .gft-navmenu .mud-navitem {
        border-radius: 0 24px 24px 0;
        margin-right: 8px;
    }

    .gft-navmenu .mud-nav-link.active {
        background-color: rgba(63, 81, 181, 0.08);
        font-weight: 500;
    }

/* Titoli delle sezioni */
.gft-section-title {
    font-size: 1.25rem;
    font-weight: 500;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.12);
}

.gft-subtitle {
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 12px;
    color: rgba(0, 0, 0, 0.77);
}

/* Stili per card */
.gft-card {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.gft-card-content {
    flex-grow: 1;
}

.gft-card-actions {
    padding: 8px 16px;
    justify-content: flex-end;
}

/* Stili specifici per i dialog */
.gft-dialog-title {
    padding: 16px 24px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.12);
}

.gft-dialog-content {
    padding: 16px 24px;
}

.gft-dialog-actions {
    padding: 8px 24px;
    border-top: 1px solid rgba(0, 0, 0, 0.12);
}

/* ===== UTILITIES ===== */

/* Truncate text with ellipsis */
.text-truncate {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Stati e indicatori */
.status-indicator {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    text-align: center;
}

.status-active {
    background-color: rgba(76, 175, 80, 0.12);
    color: #2e7d32;
}

.status-inactive {
    background-color: rgba(244, 67, 54, 0.12);
    color: #d32f2f;
}

.status-pending {
    background-color: rgba(255, 152, 0, 0.12);
    color: #ed6c02;
}

/* Responsive Helpers */
@media (max-width: 600px) {
    .gft-paper {
        padding: 12px;
    }

    .gft-dialog-content {
        padding: 12px 16px;
    }
}

/* ===== ANIMAZIONI ===== */
.fade-in {
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Effetto hover sottile */
.hover-effect {
    transition: all 0.2s ease-in-out;
}

    .hover-effect:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    }

/* ===== SYNCFUSION OVERRIDES ===== */
/* Per coerenza con lo stile MudBlazor */
.e-grid {
    font-family: 'Roboto', 'Segoe UI', system-ui, sans-serif;
    border-radius: 4px;
    overflow: hidden;
}

    .e-grid .e-headercell {
        background-color: #f5f5f5;
        color: rgba(0, 0, 0, 0.77);
        font-weight: 500;
    }

    .e-grid .e-rowcell {
        padding: 8px 12px;
    }

.e-pager {
    padding: 8px;
    background-color: #ffffff;
}

/* ===== OVERRIDE SPECIFICI PER COMPONENTI ===== */

/* Spinner di caricamento */
.mud-progress-circular {
    color: #3f51b5;
}

/* Bottoni */
.mud-button-filled.mud-button-filled-primary {
    background-color: #3f51b5;
}

.mud-button-filled.mud-button-filled-secondary {
    background-color: #f50057;
}

/* AppBar */
.mud-appbar.mud-appbar-dense {
    min-height: 56px;
}

/* File Upload personalizzato */
.custom-uploader {
    border: 2px dashed #dddddd;
    padding: 24px;
    text-align: center;
    background-color: #fafafa;
    border-radius: 4px;
    transition: all 0.3s ease;
}

    .custom-uploader:hover {
        border-color: #3f51b5;
        background-color: #f5f7ff;
    }

/* ===== STILI PER DASHBOARD HOME PAGE ===== */

/* Container principale dashboard */
.dashboard-container {
    padding-top: 1rem;
}

/* Header dashboard */
.dashboard-header {
    background: linear-gradient(135deg, rgba(63, 81, 181, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    border-radius: 12px !important;
    border-left: 4px solid #3f51b5;
}

.dashboard-logo {
    height: 48px;
    width: auto;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

/* Card statistiche con hover effect */
.summary-card {
    transition: all 0.3s ease;
    border-radius: 12px !important;
    cursor: pointer;
}

.summary-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15) !important;
}

/* Bottoni azioni rapide */
.quick-action-button {
    height: 56px;
    border-radius: 12px !important;
    transition: all 0.3s ease;
    font-weight: 500 !important;
}

.quick-action-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Widget styling */
.mud-paper {
    border-radius: 12px !important;
}

/* Lista attività recenti */
.mud-list-item {
    border-radius: 8px;
    margin-bottom: 4px;
    transition: background-color 0.2s ease;
}

.mud-list-item:hover {
    background-color: rgba(63, 81, 181, 0.04) !important;
}

/* Responsive adjustments per dashboard */
@media (max-width: 768px) {
    .dashboard-container {
        padding-top: 0.5rem;
    }

    .dashboard-header {
        text-align: center;
    }

    .dashboard-logo {
        height: 36px;
    }

    .quick-action-button {
        height: 48px;
        font-size: 0.875rem;
    }

    .summary-card .mud-card-content {
        padding: 12px !important;
    }
}

/* Animazioni per i widget */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dashboard-container .mud-paper {
    animation: slideInUp 0.6s ease-out;
}

/* Stagger animation per i widget */
.dashboard-container .mud-grid > .mud-grid-item:nth-child(1) .mud-paper {
    animation-delay: 0.1s;
}

.dashboard-container .mud-grid > .mud-grid-item:nth-child(2) .mud-paper {
    animation-delay: 0.2s;
}

.dashboard-container .mud-grid > .mud-grid-item:nth-child(3) .mud-paper {
    animation-delay: 0.3s;
}

.dashboard-container .mud-grid > .mud-grid-item:nth-child(4) .mud-paper {
    animation-delay: 0.4s;
}

/* ===== STILI PER LOGIN PAGE ===== */

/* Container principale del login */
.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem 1rem;
}

/* Card del login con animazioni e stili moderni */
.login-card {
    max-width: 420px;
    width: 100%;
    border-radius: 16px !important;
    overflow: hidden;
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95) !important;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1), 0 0 0 1px rgba(255, 255, 255, 0.05) !important;
}

/* Header del login con logo e titolo */
.login-header {
    padding: 2rem 2rem 1.5rem 2rem !important;
    text-align: center;
    background: linear-gradient(135deg, rgba(63, 81, 181, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
}

.logo-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.company-logo-login {
    height: 60px;
    width: auto;
    margin-bottom: 0.5rem;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.login-title {
    color: #3f51b5 !important;
    font-weight: 600 !important;
    letter-spacing: 0.5px;
    margin: 0 !important;
}

.login-subtitle {
    color: rgba(0, 0, 0, 0.6) !important;
    font-weight: 400 !important;
    margin: 0 !important;
}

/* Form del login */
.login-form {
    padding: 1.5rem 2rem !important;
}

.login-field {
    margin-bottom: 0.5rem;
}

.login-field .mud-input-control {
    border-radius: 12px;
}

.login-field .mud-input-outlined .mud-input-outlined-border {
    border-color: rgba(63, 81, 181, 0.2);
    transition: all 0.3s ease;
}

.login-field .mud-input-outlined:hover .mud-input-outlined-border {
    border-color: rgba(63, 81, 181, 0.4);
}

.login-field .mud-input-outlined.mud-input-focused .mud-input-outlined-border {
    border-color: #3f51b5;
    border-width: 2px;
}

.login-checkbox {
    margin-top: 0.5rem;
}

.login-checkbox .mud-checkbox-content {
    color: rgba(0, 0, 0, 0.7);
    font-size: 0.875rem;
}

/* Alert per errori */
.login-alert {
    margin-bottom: 1.5rem;
    border-radius: 12px;
    border-left: 4px solid #f44336;
}

/* Azioni del login */
.login-actions {
    padding: 0 2rem 1.5rem 2rem !important;
}

.login-button {
    height: 48px;
    border-radius: 12px !important;
    font-weight: 600 !important;
    text-transform: none !important;
    box-shadow: 0 4px 12px rgba(63, 81, 181, 0.3) !important;
    transition: all 0.3s ease !important;
}

.login-button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(63, 81, 181, 0.4) !important;
}

.login-button:active {
    transform: translateY(0);
}

.login-button:disabled {
    opacity: 0.7;
    transform: none !important;
}

/* Footer del login */
.login-footer {
    padding: 1rem 2rem 1.5rem 2rem !important;
    background: rgba(0, 0, 0, 0.02);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.login-footer-text {
    color: rgba(0, 0, 0, 0.5) !important;
    font-size: 0.75rem !important;
}

/* Animazioni */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

/* Responsive design per mobile */
@media (max-width: 480px) {
    .login-container {
        padding: 1rem 0.5rem;
    }

    .login-card {
        margin: 0;
        border-radius: 12px !important;
    }

    .login-header {
        padding: 1.5rem 1.5rem 1rem 1.5rem !important;
    }

    .login-form {
        padding: 1rem 1.5rem !important;
    }

    .login-actions {
        padding: 0 1.5rem 1rem 1.5rem !important;
    }

    .login-footer {
        padding: 0.75rem 1.5rem 1rem 1.5rem !important;
    }

    .company-logo-login {
        height: 50px;
    }

    .login-title {
        font-size: 1.25rem !important;
    }
}

/* ===== STILI PER DETTAGLIO COMMESSA ===== */

/* Stile per il menu laterale nella pagina dettaglio commessa */
.mud-nav-link.mud-nav-link-active {
    background-color: rgba(63, 81, 181, 0.1);
    border-right: 3px solid #3f51b5;
    font-weight: 500;
}

.mud-nav-link:not(.mud-nav-link-active):hover {
    background-color: rgba(63, 81, 181, 0.05);
}

.mud-nav-link {
    cursor: pointer;
}

/* Card con hover effect per le schede di riepilogo */
.summary-card {
    transition: all 0.2s ease-in-out;
}

.summary-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Stile per il contenitore principale della pagina dettaglio */
.commessa-detail-container {
    margin-top: 1.5rem;
}

/* Stile per l'header della commessa */
.commessa-header {
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1.5rem;
}

/* Stile per le icone nel menu laterale */
.commessa-menu-icon {
    margin-right: 8px;
    color: #3f51b5;
}

/* Badges e indicatori per i conteggi nel menu */
.commessa-menu-badge {
    background-color: rgba(63, 81, 181, 0.1);
    color: #3f51b5;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    margin-left: 8px;
}

/* Stili responsive per il menu */
@media (max-width: 768px) {
    .commessa-detail-container {
        margin-top: 0.5rem;
    }
    
    /* Miglioramenti per i tab su mobile */
    .mud-tabs-toolbar {
        justify-content: space-around;
    }
    
    .mud-tabs-toolbar .mud-tab {
        min-width: 0;
        padding: 8px;
    }
    
    /* Rende più compatta la visualizzazione su mobile */
    .mud-grid-spacing-xs-4 > .mud-grid-item {
        padding: 8px;
    }
}