/* Custom styles goes here */

:root {
    /* --- VARIABILI COLORE ESTRATTE DAL LOGO --- */
    /* Blu Scuro (Cerchio esterno e Scritta GARANZIA) */
    --bs-primary: #0026C6;
    --bs-primary-rgb: 0, 38, 198;
    --brand-dark-blue: #0026C6;
    /* Azzurro Chiaro (Icona interna Chiave/Auto) */
    --brand-light-blue: #3A82F6;
    --brand-light-blue-rgb: 58, 130, 246;
    /* Sfondi e Hover */
    --brand-bg-light: #F0F4FF;
    --brand-hover-dark: #001C94;
    --brand-hover-light: #2563EB;
}

/* --- ELEMENTI PRIMARI (Bottoni, Link, Elementi Attivi) --- */
.btn-primary {
    background-color: var(--brand-dark-blue) !important;
    border-color: var(--brand-dark-blue) !important;
    box-shadow: 0 0.125rem 0.25rem 0 rgba(var(--bs-primary-rgb), 0.4) !important;
}

    .btn-primary:hover,
    .btn-primary:focus,
    .btn-primary:active {
        background-color: var(--brand-hover-dark) !important;
        border-color: var(--brand-hover-dark) !important;
    }

/* --- SIDEBAR E MENU DI NAVIGAZIONE --- */
.menu-vertical .menu-item.active > .menu-link {
    color: var(--brand-dark-blue) !important;
    background-color: rgba(var(--bs-primary-rgb), 0.1) !important;
}

.menu-vertical .menu-item.active:not(.open) > .menu-link::before {
    background-color: var(--brand-dark-blue) !important;
}

/* --- BADGE E CLASSI UTILITY UTENTE --- */
.bg-label-primary {
    background-color: rgba(var(--bs-primary-rgb), 0.1) !important;
    color: var(--brand-dark-blue) !important;
}

.bg-light {
    background-color: var(--brand-bg-light) !important;
    --bs-bg-opacity: 1;
    background-color: rgba(240, 244, 255, var(--bs-bg-opacity)) !important;
}

/* --- FOCUS FORM --- */
.form-control:focus,
.form-select:focus {
    border-color: var(--brand-dark-blue) !important;
    box-shadow: 0 0 0 0.25rem rgba(var(--bs-primary-rgb), 0.25) !important;
}


/* ==========================================================================
   --- STRUTTURA MODALE COMUNE ---
   ========================================================================== */
.modal-brand-error,
.modal-brand-success {
    border: none !important;
}

.modal-backdrop-custom,
.modal-custom-backdrop {
    display: block;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(2px);
}

.modal-header-brand,
.modal-header-orange {
    background-color: var(--brand-dark-blue) !important;
}

/* --- MODAL ERRORE (#errorModal) --- */
.border-left-brand {
    /* Identifica l'errore con un azzurro deciso al posto del vecchio arancione */
    border-left: 5px solid var(--brand-light-blue) !important;
}

.text-brand-error {
    color: var(--brand-light-blue);
}

.title-brand-error {
    letter-spacing: 1px;
    font-size: 0.9rem;
    color: var(--brand-dark-blue);
}

.badge-brand-error {
    background-color: rgba(var(--brand-light-blue-rgb), 0.1) !important;
    color: var(--brand-light-blue) !important;
}

/* --- MODAL SUCCESSO (#successModal) --- */
.border-top-brand {
    border-top: 4px solid var(--brand-light-blue) !important;
}

.badge-brand-success {
    background-color: rgba(var(--brand-light-blue-rgb), 0.1) !important;
    color: var(--brand-light-blue) !important;
}

.title-brand-success {
    color: var(--brand-dark-blue);
}

.btn-brand-success {
    background-color: var(--brand-light-blue) !important;
    color: #ffffff !important;
    border: none;
    transition: background-color 0.2s ease-in-out;
}

    .btn-brand-success:hover,
    .btn-brand-success:focus {
        background-color: var(--brand-hover-light) !important;
    }


/* ==========================================================================
   --- ELEMENTI DELLA LISTA (CARD SERIALI) ---
   ========================================================================== */
.seriale-item,
.seriale-item-card {
    background-color: #ffffff;
    border-color: #eeeeee;
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

    /* Effetto Hover dinamico basato sull'azzurro dell'icona del logo */
    .seriale-item:not(.seriale-scaduto):hover,
    .seriale-item-card:not(.seriale-scaduto):hover {
        border-color: var(--brand-light-blue) !important;
        transform: scale(1.01);
    }

    /* --- Stato Scaduto (Mantiene i feedback di errore semantici standard) --- */
    .seriale-item.seriale-scaduto,
    .seriale-item-card.seriale-scaduto {
        background-color: #fff5f5 !important;
        border-color: #ffcccc !important;
        cursor: not-allowed;
        opacity: 0.8;
    }

/* --- Dettagli Testo, Titoli e Icone --- */
.text-danger-custom {
    color: #dc3545;
}

.text-dark-custom,
.seriale-titolo {
    color: var(--brand-dark-blue) !important;
}

.seriale-scaduto .seriale-titolo {
    color: #dc3545 !important;
}

.icon-brand-color,
.seriale-icon-calendar {
    color: var(--brand-light-blue) !important;
}
