﻿/* Cambia sfondo dei pulsanti Radzen */
:root {
    --rz-success-dark: #008080 !important;
    --rz-info-darker: #1A1B41 !important;
    --rz-progressbar-background-color: #008080 !important;
    --rz-progressbar-value-background-color: #008080 !important;
}

.rz-button.rz-button-success {
    background-color: #008080 !important;
    border-color: #008080 !important;
}

.fixed-header {
    height: 60px;
    min-height: 60px;
    max-height: 60px;
    padding: 0 1rem;
    box-sizing: border-box;
    overflow: hidden;
}

@media (max-width: 600px) {
    .fixed-header {
        flex-direction: column;
        height: auto;
    }
}
.custom-loader-wrapper {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    padding-top: 2rem;
    background-color: #f3f4f6;
    font-family: 'Segoe UI', sans-serif;
}

.custom-loader-card {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 450px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.1);
    border-radius: 16px;
    overflow: hidden;
    background-color: white;
}

.custom-loader-top {
    text-align: center;
    background-color: #1A1B41;
    color: white;
    padding: 1.5rem;
}

.custom-loader-logo {
    width: 64px;
    height: auto;
    margin-bottom: 1rem;
}

.custom-loader-bottom {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.5rem;
    background-color: #ffffff;
}

.custom-loader-container {
    display: grid;
    place-items: center;
    width: 120px;
    height: 120px;
    position: relative;
}

/* SVG e testo condividono lo stesso “centro” della griglia */
.custom-loader-progress {
    width: 100%;
    height: 100%;
    display: block;
    grid-area: 1 / 1;
}

    .custom-loader-progress circle {
        fill: none;
        stroke-width: 0.6rem;
        transform-origin: 50% 50%;
        transform: rotate(-90deg);
    }

        /* cerchio di sfondo */
        .custom-loader-progress circle:first-child {
            stroke: #e0e0e0;
        }

        /* cerchio di avanzamento collegato al vero caricamento Blazor */
        .custom-loader-progress circle:last-child {
            stroke: #008080;
            stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
            transition: stroke-dasharray 0.05s ease-in-out;
        }

/* testo percentuale reale */
.custom-loader-text {
    grid-area: 1 / 1;
    font-weight: bold;
    font-size: 1.2rem;
    color: #008080;
    text-align: center;
    line-height: 1; /* elimina drift verticale del font */
    transform: translateZ(0); /* evita subpixel shift */
    pointer-events: none; /* non cattura click */
    /* ...regole precedenti... */
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

    .custom-loader-text::after {
        content: var(--blazor-load-percentage-text, "Loading");
    }
 
/* Impedisci che le colonne si adattino verticalmente */
.fixed-header .rz-col-6 {
    flex: 0 0 auto !important;
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Ridimensiona il logo */
.logo-small {
    height: 28px;
    width: auto;
    margin-right: 10px;
    vertical-align: middle;
}
.img-qrt {
    height: 48px;
    width: 48px;
    margin-right: 10px;
    vertical-align: middle;
}

@media (max-width: 768px) {
    .rz-row {
        flex-direction: column !important;
    }
    .rz-panel-menu-item {
        padding: 3px 6px !important;
        font-size: 12px !important;
        min-height: 32px !important;
    }
    .rz-sidebar {
        width: 180px !important;
    }
}

.rz-panel-menu-item {
    padding: 4px 8px !important;
    font-size: 14px !important;
    min-height: 40px !important;
}

.rz-sidebar {
    width: 220px !important;
}
.img-main {
    position: absolute;
    top: -2px;
    right: -4px;
    background-color: #008080;
    color: white;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 2px rgba(0,0,0,0.5);
}
/* Ingrandisce la freccia di espansione */
/*.rz-datagrid .rz-tree-toggle-icon {
    font-size: 1.2rem;
    color: #008080;
    margin-right: 0.5rem;
}*/

/* Allinea verticalmente con il nome */
/*.rz-datagrid .rz-tree-toggle {
    display: flex;
    align-items: center;
}*/

.rz-datagrid .rz-tree-toggle {
    display: none !important;
}
.rz-datagrid .rz-tree-toggle-icon {
    font-size: 1.4rem;
    color: #008080;
}
body {
    padding: 0 !important;
    margin: 0 !important;
}
.notification-card {   
    border-bottom: 1px solid #e0e0e0;
    padding: 12px 10px;
    font-size: 0.85rem;
    display: flex;
    flex-direction: column;
    gap: 8px;
    background-color: #fff;
}

.notification-header {   
    display: flex;
    justify-content: space-between;
    font-weight: 600;
    font-size: 0.9rem;
    color: #333;
}

.notification-meta {    
    display: flex;
    flex-direction: column;
    gap: 2px;
    color: #666;
    font-size: 0.8rem;
}

.notification-preview {    
    font-size: 0.85rem;
    color: #444;
}

.preview-text {   
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: normal;
    word-break: break-word;
}

.notification-actions {   
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

    .notification-actions .left {
        flex-shrink: 0;
    }

    .notification-actions .right {
        display: flex;
        gap: 6px;
        align-items: center;
    }

    .notification-actions .rz-button,
    .notification-actions .rz-progressbar {
        height: 2rem;
    }

.signin-wrapper {
    display: flex;
    justify-content: center; /* centra orizzontalmente */
    align-items: flex-start; /* allinea in alto */
    padding-top: 1rem; /* distanza dal bordo superiore */
    padding-left: 1rem;
    padding-right: 1rem;
    min-height: 90vh;
    background-color: #f3f4f6;
    font-family: 'Segoe UI', sans-serif;
}

.signin-card {
    width: 100%;
    max-width: 450px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.1);
    border-radius: 16px;
    overflow: hidden;
}

/* Sezione superiore */
.signin-top {
    background-color: #1A1B41;
    color: white;
    text-align: center;
    padding: 1.5rem 1.5rem;
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
}

.signin-logo {
    width: 64px;
    height: auto;
    margin-bottom: 1rem;
}

.signin-top h1 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.signin-top p {
    font-size: 1rem;
    color: #ccc;
}

/* Sezione inferiore */
.signin-bottom {
    background-color: #ffffff;
    text-align: center;
    padding: 2rem 1.5rem;
    border-bottom-left-radius: 16px;
    border-bottom-right-radius: 16px;
}

    .signin-bottom h2 {
        font-size: 1.4rem;
        margin-bottom: 0.5rem;
        color: #333;
    }

    .signin-bottom p {
        font-size: 1rem;
        color: #666;
    }

/* Responsive */
@media (min-width: 768px) {
    .signin-card {
        max-width: 600px;
    }
    .signin-top h1 {
        font-size: 2.2rem;
    }
    .signin-bottom h2 {
        font-size: 1.6rem;
    }
    .signin-logo {
        width: 80px;
    }
}

@media (max-width: 480px) {
    .signin-wrapper {
        padding-top: 2rem;
    }
    .signin-card {
        max-width: 100%;
    }
    .signin-top h1 {
        font-size: 1.5rem;
    }
    .signin-bottom h2 {
        font-size: 1.2rem;
    }
    .signin-logo {
        width: 56px;
    }
    .rz-stack[orientation="Horizontal"] {
        flex-direction: column;
        gap: 0.25rem;
    }

    .badge-responsive {
        width: 100%; /* ogni badge occupa tutta la riga */
    }
}

.loggedout-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(to right, #f3f4f6, #e2e8f0);
    font-family: 'Segoe UI', sans-serif;
    padding: 2rem;
}

.loggedout-card {
    background-color: white;
    padding: 2.5rem;
    border-radius: 16px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.1);
    text-align: center;
    max-width: 400px;
    width: 100%;
}

.loggedout-logo {
    width: 64px;
    height: auto;
    margin-bottom: 1rem;
}

.loggedout-card h1 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    color: #333;
}

.loggedout-card p {
    font-size: 1rem;
    color: #666;
    margin-bottom: 0.5rem;
}

.redirect-msg {
    font-style: italic;
    color: #888;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.spin {
    animation: spin 1s linear infinite;
}

.highlight {
    background: #ffe58f;
    font-weight: bold;
    border-radius: 3px;
    padding: 0 2px;
}

/* Badge flessibili e wrappabili */
.badge-vertical {
    display: inline-flex;
    align-items: center;
    max-width: 160px; /* limite massimo di larghezza */
    width: 100%; /* occupa tutta la riga disponibile */
    box-sizing: border-box;
    padding: 0.25rem 0.5rem;
    line-height: 1.2rem;
    white-space: normal; /* consente il testo su più righe */
    word-break: break-word; /* spezza parole lunghe */
}

.badge-consultant {
    background: #e3f2fd !important;
    color: #1A1B41 !important;
    font-weight: bold;
    width: 98px; /* larghezza fissa */
    text-align: center; /* centra il testo */
    display: inline-block; /* assicura che la width venga rispettata */
    white-space: nowrap; /* evita che il testo vada a capo */
}

.badge-manager {
    background: #f3e5f5 !important;
    color: #6a1b9a !important;
    font-weight: bold;
    width: 98px; /* larghezza fissa */
    text-align: center; /* centra il testo */
    display: inline-block; /* assicura che la width venga rispettata */
    white-space: nowrap; /* evita che il testo vada a capo */
}

.badge-director {
    background: #e8f5e9 !important;
    color: #008080 !important;
    font-weight: bold;
    width: 98px; /* larghezza fissa */
    text-align: center; /* centra il testo */
    display: inline-block; /* assicura che la width venga rispettata */
    white-space: nowrap; /* evita che il testo vada a capo */
}

/* fallback generico */
.badge-partner {
    background: #fff3e0 !important; /* arancio chiaro, molto soft */
    color: #e65100 !important; /* arancio scuro */
    font-weight: bold;
    width: 98px; /* larghezza fissa */
    text-align: center; /* centra il testo */
    display: inline-block; /* assicura che la width venga rispettata */
    white-space: nowrap; /* evita che il testo vada a capo */
}

/* fallback generico */
.badge-default {
    background: #f5f5f5 !important; /* grigio chiaro, neutro */
    color: #424242 !important; /* grigio scuro, leggibile */
    font-weight: bold;
    width: 98px; /* larghezza fissa */
    text-align: center; /* centra il testo */
    display: inline-block; /* assicura che la width venga rispettata */
    white-space: nowrap; /* evita che il testo vada a capo */
}