/* ==========================================================================
   GIGA GESTIONALE - CORE STYLESHEET (custom_giga.css)
   ========================================================================== */

/* --- 1. STRUTTURA LAYOUT & COMPONENTI STICKY --- */
.giga-sticky-actions {
    top: 1.5rem;
}

.giga-sidebar-sticky {
    top: 1rem;
}

.giga-sidebar-sticky-combined {
    top: 1.5rem;
}

.spalla-riepilogo-sticky {
    top: 24px;
}

/* --- 2. INTEGRAZIONE UTILITY SELECT2 (CAMPI MASTER) --- */
.master-field+.select2-container .select2-selection,
#id_cliente+.select2-container .select2-selection,
#id_compagnia+.select2-container .select2-selection,
#id_agenzia+.select2-container .select2-selection,
#id_produttore+.select2-container .select2-selection,
#id_beneficiario+.select2-container .select2-selection {
    height: 52px !important;
    display: flex !important;
    align-items: center !important;
    border-radius: 8px !important;
}

/* --- 3. SEZIONI, CARD & EFFETTI VISIVI --- */
.giga-login-card {
    max-width: 420px;
    width: 100%;
}

.card-nota-custom {
    background-color: #fffdf0;
    border-left: 3px solid #ffc107 !important;
}

.hover-shadow {
    transition: all 0.3s ease;
}

.hover-shadow:hover {
    transform: translateY(-5px);
    box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .15) !important;
}

.toast-container-giga {
    z-index: 1090;
}

/* --- 4. FUNZIONI FILTRI & INPUT CONTROLLI --- */
.giga-filter-radio-container {
    min-height: 38px;
}

.giga-filter-radio-item {
    white-space: nowrap;
}

.giga-range-input-group input {
    display: block;
    width: 100%;
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    font-weight: 400;
    line-height: 1.5;
    color: #212529;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid #ced4da;
    appearance: none;
    border-radius: 0.25rem;
    transition: border-color .15s ease-in-out, box-shadow .15s ease-in-out;
}

.btn-check:checked+.custom-segment-btn {
    background-color: #4c7356 !important;
    /* Verde Outer della tabella contratti */
    border-color: #4c7356 !important;
    color: #fff !important;
}

.form-control:focus {
    border-color: #ffc107;
    box-shadow: 0 0 0 0.25rem rgba(255, 193, 7, 0.25);
}

.custom-switch-warning:checked {
    background-color: #ffc107;
    border-color: #ffc107;
}

/* --- 5. TIPOGRAFIA & TRONCAMENTI TESTO --- */
.giga-master-descrizione {
    font-size: 1.25rem;
    font-weight: 500;
}

.giga-subtab-header-title {
    letter-spacing: 1px;
}

.giga-cronologia-subtext {
    font-size: 0.75rem;
}

.giga-dashboard-cliente-truncate {
    max-width: 140px;
}

.testo-descrizione-fattura,
.nota-polizza-pre {
    white-space: pre-line;
}

.nota-polizza-pre {
    line-height: 1.2;
}

.allegato-nome-max {
    max-width: 70%;
}

/* --- 6. MICRO METADATI, ETICHETTE E BOTTONI --- */
.giga-meta-desc-label {
    font-size: 0.75rem !important;
}

.giga-meta-label {
    font-size: 0.7rem !important;
}

.giga-economica-label {
    font-size: 0.7rem;
    letter-spacing: 0.5px;
}

.giga-btn-add-micro,
.giga-btn-add-doc {
    font-size: 0.7rem;
}

.ms-5-custom {
    margin-left: 2.5rem;
}

/* --- 7. STRUTTURE TABELLARI (AGENZIE, COMPAGNE, EMAIL) --- */
.giga-table-status-badge {
    display: inline-block;
    width: 90px;
    text-align: center;
}

.giga-table-agenzie,
.giga-table-compagnie {
    font-size: 0.9rem;
}

.giga-cell-email-container {
    min-width: 0;
}

/* --- 8. MICRO-BADGES DI STATO (CONSOLIDATI) --- */
.giga-badge-appendice-header {
    font-size: 0.9rem;
}

.giga-badge-dare-container {
    font-size: 0.75rem;
}

.giga-badge-profile-status,
.giga-badge-profile-sidebar,
.giga-badge-profile-mini,
.giga-meta-label-mini,
.giga-badge-dare-label {
    font-size: 0.65rem !important;
}

/* --- 9. GRIGLIA COMPATTA CERTIFICAZIONI ISO (REALI & PLACEHOLDER) --- */
.cert-grid-wrapper {
    width: 135px;
    margin: 0 auto;
}

.cert-badge-real {
    height: 22px;
    margin: 1px;
    font-size: 0.55rem;
    line-height: 1;
    overflow: hidden;
}

.cert-badge-placeholder {
    height: 22px;
    margin: 1px;
    border-style: dashed !important;
}

.small-micro-text {
    font-size: 0.5rem;
}

.row-cols-3>.col:nth-child(n+7) {
    display: none !important;
}

.bg-danger {
    background-color: #dc3545 !important;
    color: #fff !important;
}

.bg-success {
    background-color: #198754 !important;
    color: #fff !important;
}

.bg-warning {
    background-color: #ffc107 !important;
    color: #212529 !important;
}

.bg-danger strong,
.bg-success strong {
    color: #fff !important;
}

.bg-warning strong {
    color: #212529 !important;
}
