html, body {
height: 100%;
}

body {
    margin: 0;
    overflow-x: hidden;
}

body {
    background: #f4f6f9;
}

/* inizio grafico */
.grafico-wrapper {
    width: 400px;
    position: relative;
    font-family: Arial, sans-serif;
}

.grafico {
    width: 100%;
    height: 20px;

    background: #FF0000;
    background: linear-gradient(90deg, rgba(255, 0, 0, 1) 0%, rgba(255, 255, 0, 1) 50%, rgba(25, 135, 84, 1) 100%);

        border-radius: 10px;
        overflow: hidden;
    }

.marker {
    position: absolute;
    top: -6px;
    bottom: 12px;
    width: 2px;
    background: #000;
    transform: translateX(-50%);
}

/* variante compatta senza etichette sfavorevole/favorevole (es. tabelle) */
.grafico-wrapper.no-labels .marker {
    bottom: -6px;
}

/* 👇 etichette sotto */
.labels {
    display: flex;
    justify-content: space-between;
    margin-top: 6px;
    font-size: 12px;
    color: #555;
}
/* fine grafico */

/* OVERVIEW BOX */
.overview-box {
    background: #fff;
    border-radius: 18px;
    padding: 30px 20px;
    height: 100%;
    min-height: 240px;

    width: 88%;
    margin-left: auto;
    margin-right: auto;

    box-shadow: 0 3px 10px rgba(0,0,0,0.05);
}

.overview-box .box-title {
    font-weight: 600;
    font-size: 1.16rem;
    color: #6c757d;
    margin-bottom: 10px;
}

.overview-box .box-value {
    font-weight: 1000;
    font-size: 3.75rem;
    color: #000;
    margin-bottom: 16px;
}

.overview-box .box-value.text-verde { color: #0faf55; }
.overview-box .box-value.text-azzurro { color: #12aedd; }
.overview-box .box-value.text-fucsia { color: #d63384; }
.overview-box .box-value.text-rossa { color: #dc3545; }
.overview-box .box-value.text-arancio { color: #fd7e14; }

/* numero secondario, più piccolo del box-value principale */
.overview-box .box-value-md {
    font-weight: 1000;
    font-size: 3rem;
    color: #000;
    margin-bottom: 6px;
}

.overview-box .box-text {
    font-size: 0.95rem;
    color: #333;
}

/* la barra multicolore, adattata alla larghezza del box */
.overview-box .grafico-wrapper {
    width: 100%;
}

/* barra di avanzamento monocolore, bordi arrotondati */
.overview-box .box-progress {
    width: 100%;
    height: 14px;
    border-radius: 10px;
    background: #e9ecef;
    overflow: hidden;
}

.overview-box .box-progress-fill {
    height: 100%;
    border-radius: 10px;
}

.overview-box .box-progress-fill.bg-verde { background: #198754; }
.overview-box .box-progress-fill.bg-azzurro { background: #0d6efd; }
.overview-box .box-progress-fill.bg-fucsia { background: #d63384; }
/* fine overview box */

/* variante a larghezza piena, per i box che devono estendersi quanto le colonne sovrastanti */
/* le due colonne sovrastanti (col-md-6) contengono ciascuna un box all'88%: il margine
   residuo del 6% per colonna equivale, su una col-12, a un margine del 3% per lato */
.overview-box.overview-box-wide {
    width: 94%;
    margin-left: auto;
    margin-right: auto;
}

/* variante compatta, senza il padding verticale/min-height standard */
.overview-box.overview-box-compact {
    padding: 16px 20px;
    min-height: 0;
    height: auto;
}

.overview-box .box-title.text-arancio { color: #fd7e14; }
.overview-box .box-title.text-verde { color: #198754; }

/* etichette colorate (miri_c) */
.label-chip {
    display: inline-block;
    padding: 6px 14px;
    margin: 4px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #fff;
}
.label-chip.bg-rossa { background: #dc3545; }
.label-chip.bg-arancio { background: #fd7e14; }
.label-chip.bg-verde { background: #198754; }
.label-chip.bg-gialla { background: #ffc107; color: #212529; }

/* TOPBAR */
.topbar {
    background: #000;
    color: #fff;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* SIDEBAR */
.sidebar {
    width: 260px;
    background: #fff;
    border-right: 1px solid #e5e5e5;
    display: flex;
    flex-direction: column;
}
/* search */
.sidebar .search {
    padding: 15px;
}

.sidebar .nav-link {
    color: #333;
    padding: 10px 15px;
}

.sidebar .nav-link:hover {
    background: #f1f1f1;
}

/* bottom user box */
.user-box {
    margin-top: auto;
    padding: 15px;
    background: #e7f3ff;
    border-radius: 12px;
    margin: 15px;
}

.user-box .btn {
    width: 100%;
}

/* MAIN */
.main {
    padding: 25px;
    width: 100%;
}

.page-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 20px;
}

/* BIG BUTTONS */
.big-btn {
    background: #fff;
    border-radius: 18px;
    padding: 25px 15px;
    text-align: center;

    height: 260px;

    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;

    box-shadow: 0 3px 10px rgba(0,0,0,0.05);
    transition: 0.2s;
}

.big-btn:hover {
    transform: translateY(-4px);
}

.big-btn i {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.border-fucsia { border-bottom: 16px solid #d63384; color: #d63384; font-weight:bold; font-size:30px;}
.border-arancio { border-bottom: 16px solid #fd7e14; color: #fd7e14;font-weight:bold; font-size:30px;}
.border-verde { border-bottom: 16px solid #198754; color: #198754;font-weight:bold; font-size:30px;}
.border-blu { border-bottom: 16px solid #0d6efd; color: #0d6efd;font-weight:bold; font-size:30px;}

.search-box {
    display: flex;
    align-items: center;
    gap: 8px;

    background: #dff3ff;
    border: 1px solid #bfe6ff;

    padding: 10px 12px;
    margin: 15px;
    border-radius: 50px;

    transition: 0.2s ease;
}

.search-box i {
    color: #3b82f6;
    font-size: 1rem;
}

.search-box input {
    border: none;
    outline: none;
    background: transparent;
    width: 100%;
    font-size: 0.95rem;
}

.search-box:focus-within {
    background: #cfeeff;
    border-color: #7cc8ff;
    box-shadow: 0 0 0 3px rgba(59,130,246,0.15);
}

/* LAYOUT */
.layout {
    display: flex;
    min-height: calc(100vh - 56px);
}

/* FOOTER */
footer {
    background: #000;
    color: #fff;
    text-align: center;
    padding: 12px;
}

/* MOBILE */
@media (max-width: 991px) {
    .sidebar {
        display: none;
    }
}

/* login */
.login-card {
    width: 100%;
    max-width: 420px;

    background: #fff;
    border-radius: 18px;
    padding: 35px 25px;

    box-shadow: 0 3px 15px rgba(0,0,0,0.08);

    display: flex;
    flex-direction: column;
    gap: 15px;
}
.login-btn {
    border: none;
    border-radius: 50px;
    padding: 12px;
    font-weight: 600;

    background: #0d6efd;
    color: white;

    transition: 0.2s;
}

.login-btn:hover {
    transform: translateY(-2px);
}

.input-group-custom {
    display: flex;
    align-items: center;

    background: #dff3ff;
    border: 1px solid #bfe6ff;

    border-radius: 50px;
    padding: 10px 14px;

    transition: 0.2s;
}

.input-group-custom i {
    color: #0d6efd;
    margin-right: 8px;
}

.input-group-custom input {
    border: none;
    outline: none;
    background: transparent;
    width: 100%;
}

/* focus */
.input-group-custom:focus-within {
    background: #cfeeff;
    border-color: #7cc8ff;
    box-shadow: 0 0 0 3px rgba(13,110,253,0.15);
}


/* barra di sinistra di navivazione */
.sidebar-nav {
    padding: 10px 15px;
}

.sidebar-nav .nav-link {
    display: flex;
    align-items: center;
    gap: 10px;

    padding: 10px 12px;
    margin-bottom: 6px;

    border-radius: 10px;
    color: #333;
    font-weight: 500;

    transition: 0.2s ease;
}

.sidebar-nav .nav-link i {
    font-size: 1.1rem;
    color: #6c757d;
}

/* hover elegante */
.sidebar-nav .nav-link:hover {
    background: #e7f3ff;
    color: #0d6efd;
    transform: translateX(3px);
}

.sidebar-nav .nav-link:hover i {
    color: #0d6efd;
}

/* logout evidenziato */
.sidebar-nav .nav-link.text-danger {
    margin-top: 10px;
}

.sidebar-nav .nav-link.text-danger:hover {
    background: #ffe9e9;
    color: #dc3545;
}

.sidebar-nav .nav-link.text-danger:hover i {
    color: #dc3545;
}

/* sotto-voci pacchetto selezionato */
.sidebar-nav .sub-nav-link {
    padding-left: 30px;
    font-size: 0.92rem;
}

.sidebar-nav .sub-nav-link.active {
    background: #e7f3ff;
    color: #0d6efd;
}

.sidebar-nav .sub-nav-link.active i {
    color: #0d6efd;
}
/* fine barra di sinistra */

