﻿/* ----------------------------------------------------
   BASE LAYOUT
---------------------------------------------------- */

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* Sidebar */
#sidebar {
    border-radius: 0.35rem;
    position: relative;
    z-index: 9999; /* 🔥 Sidebar sempre sopra */
}

    #sidebar .nav-link {
        border-radius: 0.35rem;
        opacity: 0.85;
    }

        #sidebar .nav-link.active,
        #sidebar .nav-link:hover {
            background-color: #0d6efd;
            color: #fff;
            opacity: 1;
        }

/* Wrapper principale */
#app-wrapper {
    min-height: 100vh;
    display: flex;
    position: relative;
}

    /* 🔥 Impedisce al contenitore principale di coprire la sidebar */
    #app-wrapper > .flex-grow-1 {
        position: relative;
        z-index: 1;
        width: calc(100% - 260px); /* larghezza sidebar */
    }

/* ----------------------------------------------------
   KPI ICONS
---------------------------------------------------- */

.kpi-icon {
    font-size: 4.0rem; /* 🔥 più grande */
    opacity: 0.30; /* leggermente più soft */
    line-height: 1; /* evita spazi verticali */
}

/* ----------------------------------------------------
   CHARTS — VERSIONE STABILE
---------------------------------------------------- */

.chart-wrapper {
    height: 180px;
    position: relative;
    overflow: hidden;
}

    .chart-wrapper canvas {
        position: absolute;
        top: 0;
        left: 0;
        width: 100% !important;
        height: 100% !important;
    }

/* PIE CHART PIÙ PICCOLO */
.chart-wrapper-pie {
    height: 150px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .chart-wrapper-pie canvas {
        width: 100% !important;
        height: 100% !important;
    }

/* ----------------------------------------------------
   CARD STANDARD
---------------------------------------------------- */

.card {
    border-radius: 0.5rem;
}

.card-body {
    padding: 1rem 1.25rem;
}

/* 🔥 FIX DEFINITIVO: abilita i click sulla sidebar */
#sidebar,
#sidebar * {
    pointer-events: auto !important;
    cursor: pointer !important;
}

/* 🔥 Disabilita pointer-events su overlay accidentali */
#app-wrapper,
#app-wrapper * {
    pointer-events: auto !important;
}

/* ----------------------------------------------------
   GRID TRUNCATION (per tutte le tabelle mf-grid)
---------------------------------------------------- */

/* 🔥 FIX OBBLIGATORIO: impedisce deformazioni */
.mf-grid {
    table-layout: fixed;
}

/* Celle con troncamento */
.mf-cell {
    max-width: 180px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

    /* Tooltip automatico */
    .mf-cell:hover {
        overflow: visible;
        white-space: normal;
        background-color: #f8f9fa;
        position: relative;
        z-index: 10;
    }





