.sidebar { background-color: #2c3e50; color: white; transition: transform 0.3s ease; }
.sidebar .nav-link { color: #bdc3c7; padding: 15px 20px; }
.sidebar .nav-link:hover, .sidebar .nav-link.active { background-color: #34495e; color: white; }
@media (min-width: 768px) {
    .sidebar { position: fixed; top: 0; bottom: 0; left: 0; z-index: 100; height: 100vh; overflow-y: auto; padding-top: 20px; display: block !important; width: 16.66667%; }
    .content-area { padding: 20px; margin-left: 16.66667%; width: 83.333333%; }
}
@media (min-width: 768px) and (max-width: 991px) {
    .sidebar { width: 25%; } .content-area { margin-left: 25%; width: 75%; }
}
@media (max-width: 767.98px) {
    .sidebar { position: fixed; top: 0; left: 0; bottom: 0; width: 260px; z-index: 1050; transform: translateX(-100%); padding-top: 10px; }
    .sidebar.open { transform: translateX(0); box-shadow: 5px 0 15px rgba(0,0,0,0.3); }
    .content-area { width: 100%; margin-left: 0; padding: 15px; }
}
.dashboard-card, .list-group-item { cursor: pointer; transition: transform 0.2s, box-shadow 0.2s; border: 1px solid #dee2e6 !important; border-radius: 8px !important; margin-bottom: 8px; background-color: white; }
.dashboard-card:hover, .list-group-item:hover { transform: translateY(-3px); box-shadow: 0 6px 12px rgba(0,0,0,0.15) !important; border-color: #ced4da !important; z-index: 5; }
.dashboard-card.card-primary, .list-group-item.card-primary { border-left: 6px solid #3498db !important; }
.dashboard-card.card-success, .list-group-item.card-success { border-left: 6px solid #2ecc71 !important; }
.dashboard-card.card-warning, .list-group-item.card-warning { border-left: 6px solid #f39c12 !important; }
.btn-icon { padding: .25rem .5rem; font-size: .9rem; }
.folders-grid-container { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 100px; gap: 10px; max-height: 240px; overflow-y: auto; padding: 10px; margin-bottom: 20px; border: 1px solid #dee2e6; border-radius: 8px; background-color: #fff; }
@media (max-width: 768px) { .folders-grid-container { grid-template-columns: repeat(2, 1fr); } }
.folder-card-compact { cursor: pointer; background: #f8f9fa; border: 1px solid #e9ecef; border-radius: 8px; text-align: center; padding: 10px; transition: all 0.2s ease; position: relative; height: 100%; display: flex; flex-direction: column; justify-content: center; align-items: center; }
.folder-card-compact:hover { background: #e2e6ea; transform: translateY(-2px); box-shadow: 0 4px 6px rgba(0,0,0,0.1); border-color: #ced4da; }
.folder-icon-compact { font-size: 1.8rem; margin-bottom: 5px; color: #f39c12; }
.folder-title-compact { font-size: 0.85rem; font-weight: 600; color: #343a40; width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.folder-badge-compact { position: absolute; top: 5px; right: 5px; font-size: 0.65rem; padding: 2px 6px; border-radius: 10px; }
.group-header { background-color: #e9ecef !important; cursor: pointer; font-weight: bold; }
.group-header:hover { background-color: #dee2e6 !important; }
.group-toggle-icon { transition: transform 0.3s ease; display: inline-block; }
.group-expanded .group-toggle-icon { transform: rotate(90deg); }
.child-row td:first-child { padding-left: 30px; border-left: 3px solid #3498db; }
.btn-primary, .btn-outline-primary { background-color: #2c3e50 !important; border-color: #2c3e50 !important; color: white !important; }
.btn-primary:hover, .btn-outline-primary:hover { background-color: #1f2a38 !important; border-color: #1f2a38 !important; }
.btn-secondary, .btn-outline-secondary { background-color: #2c3e50 !important; border-color: #2c3e50 !important; color: white !important; }
.btn-secondary:hover, .btn-outline-secondary:hover { background-color: #1f2a38 !important; border-color: #1f2a38 !important; }
.modal-header { background-color: #2c3e50 !important; color: white !important; }
.modal-footer { border-top: 1px solid #2c3e50 !important; }
.btn-close-white { filter: brightness(0) invert(1); }
#folderDetailModal, #inventarioModal { z-index: 1055 !important; }
#creaProdottoModal, #spostaProdottoModal, #creaCartellaModal, #creaVeicoloModal, #creaTecnicoModal, #editUsedProductModal { z-index: 1075 !important; }
#alertModal, #confirmDeleteModal { z-index: 1095 !important; }
body.is-technician .admin-only {
    display: none !important;
}