/* Layout base Gestionale T&S — sidebar fissa su desktop, offcanvas su mobile */

:root {
    --gts-sidebar-width: 240px;
}

body {
    background-color: #f4f6f9;
}

/* Sidebar desktop */
.gts-sidebar {
    width: var(--gts-sidebar-width);
    min-height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1030;
}

@media (max-width: 991.98px) {
    .gts-sidebar {
        display: none;
    }
}

.gts-main {
    margin-left: var(--gts-sidebar-width);
}

@media (max-width: 991.98px) {
    .gts-main {
        margin-left: 0;
    }
}

/* Voci di navigazione */
.gts-nav .nav-link {
    color: #adb5bd;
    border-radius: .375rem;
    padding: .5rem .75rem;
}

.gts-nav .nav-link:hover {
    color: #fff;
    background-color: rgba(255, 255, 255, .08);
}

.gts-nav .nav-link.active {
    color: #fff;
    background-color: #0d6efd;
}

.gts-nav .nav-link.disabled {
    color: #6c757d;
}

.gts-nav .nav-link .bi {
    width: 1.25rem;
    display: inline-block;
}

.gts-nav-label {
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #6c757d;
    padding: 1rem .75rem .25rem;
}

/* Card statistiche dashboard */
.gts-stat .display-6 {
    font-weight: 600;
}

/* Grafici a barre dashboard (offline, niente librerie) */
.gts-barchart {
    display: flex;
    align-items: flex-end;
    gap: 4px;
    height: 180px;
    padding-top: 8px;
}
.gts-barchart .gts-col {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    height: 100%;
    min-width: 0;
}
.gts-barchart .gts-bar {
    width: 70%;
    max-width: 34px;
    background: #0d6efd;
    border-radius: 3px 3px 0 0;
    min-height: 2px;
    transition: height .3s ease;
}
.gts-barchart .gts-bar.gts-bar-futuro {
    background: #dee2e6;
}
.gts-barchart .gts-col-label {
    font-size: .68rem;
    color: #6c757d;
    margin-top: 4px;
    white-space: nowrap;
}

/* Barre affiancate per il confronto anno su anno */
.gts-bar-group {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 2px;
    height: 100%;
    width: 100%;
}
.gts-bar-mini {
    flex: 1 1 0;
    max-width: 13px;
    min-height: 2px;
    border-radius: 2px 2px 0 0;
    background: #0d6efd;
}
.gts-bar-mini.gts-bar-prev {
    background: #c7d2e0;
}
.gts-bar-mini.gts-bar-futuro {
    background: #eef1f5;
}
.gts-legend-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 2px;
    vertical-align: middle;
}

/* Barre orizzontali (top clienti, andamento annuale) */
.gts-hbar-row {
    margin-bottom: .6rem;
}
.gts-hbar-track {
    background: #eef1f5;
    border-radius: 4px;
    height: 22px;
    overflow: hidden;
}
.gts-hbar-fill {
    background: #0d6efd;
    height: 100%;
    border-radius: 4px;
    min-width: 2px;
}
.gts-hbar-fill.gts-hbar-accent {
    background: #198754;
}

/* Tendina con ricerca (searchable-select.js) */
.gts-ss-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 1050;
    max-height: 280px;
    overflow-y: auto;
    margin-top: 2px;
}

.gts-ss-menu .list-group-item-action {
    cursor: pointer;
    padding: .4rem .75rem;
}
