/* --- RESET E BASI --- */
@import url(https://fonts.googleapis.com/css?family=Lato:300,400,700,900,100italic,300italic,400italic);
@import url("https://fonts.googleapis.com/css?family=Montserrat");
@import url(https://fonts.googleapis.com/css?family=Oswald:700,400,300);

* {
    box-sizing: border-box;
}

:root {
    --container-width: 1200px;
    --drive-grid-layout: 2.5fr 1fr 1fr 120px;
    --primary-link: #1565c0;
    --primary-color: #0d47a1;
    --text-muted: #64748b;
    --bg-light: #f8fafc;
    --container-width: 1200px;
    --sidebar-width: 280px;
    --navbar-height: 70px;

    /* Palette Material 3 Custom */
    --m3-nav-bg: #1e293b;
    /* Navbar Blu Notte */
    --m3-sidebar-bg: #f1f5f9;
    /* Sidebar Grigio Fumo */
    --m3-bg: #f8fafc;
    /* Sfondo Body */
    --m3-surface: #ffffff;
    /* Card e Fogli */
    --m3-primary: #0b57d0;
    /* Blu Google */
    --m3-primary-container: #d3e3fd;
    --m3-on-primary-container: #041e49;
    --m3-outline: #c4c7c5;
    --m3-error: #b3261e;
    --m3-error-container: #f9dedc;

    --slate-800: #1e293b;
    /* Il tuo colore */
    --slate-700: #334155;
    /* Variante per hover */
    --slate-900: #0f172a;
    /* Variante per dropdown */
    --accent-blue: #38bdf8;
    /* Celeste brillante per elementi attivi */
    --text-slate-100: #f1f5f9;
}

body {
    font-family:
        "Montserrat",
        -apple-system,
        system-ui,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        "Helvetica Neue",
        Arial,
        sans-serif !important;
    background: #f4f7f9;
    margin: 0;
    color: #1e293b;
    line-height: 1.5;

}

.d-none-important { 
    display: none !important; 
}

.map-toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #28a745;
    color: white;
    padding: 12px 25px;
    border-radius: 5px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    display: none;
    font-family: sans-serif;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.container {
    max-width: var(--container-width);
    margin-left: auto;
    margin-right: auto;
}

a {
    text-decoration: none;
    color: inherit;
}

.text-danger {
    color: #ef4444;
}

.text-success {
    color: #22c55e;
}

.text-primary {
    color: var(--primary-color) !important;
}

.text-warning {
    color: #f59e0b;
}

.fixed-top {

    z-index: 1045;
}

.h3, h3 {
    font-size: 1.5rem;
}

/* dashboard */
.fab-google-style {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--m3-primary-container) !important;
    color: var(--m3-on-primary-container) !important;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 10px 24px;
    border-radius: 22px; 
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15), 0 1px 3px rgba(0, 0, 0, 0.1);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.25px;
    z-index: 2000; 
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.fab-google-style i {
    font-size: 1.15rem;
}

/* Effetti Hover stile Google App */
.fab-google-style:hover {
    background-color: var(--primary-color)!important; 
    color: #fff!important;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.22);
    transform: translateY(-2px);
}

/* Su mobile stretto si trasforma in un cerchio solo con il simbolo "+" per non coprire lo schermo */
@media (max-width: 576px) {
    .fab-google-style {
        padding: 16px;
        border-radius: 50%;
        bottom: 20px;
        right: 20px;
    }
	
	.tab-style-btn.test{
		padding: 16px;
        border-radius: 50%;
		margin:10px
	}
	
    .fab-google-style .fab-text,
	.tab-style-btn .fab-text	{
        display: none;
    }
	
	.main-content.designer {
		margin-top:90px!important
	}
	.h3, h3 {
		font-size: 1.17rem;
	}
}
.main-content.designer {margin-top:70px}
.report-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.report-grid.collapsed {
    display: none;
}

.report-grid.is-hidden {
    display: none !important;
}

.report-card {
    background: #f8fafc;
    padding: 15px 20px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 100px;
    transition: 0.3s;
}

/* --- STILI PER VISTA UTENTE (MATERIAL 3 & WATERMARK) --- */
.m3-user-card {
    width: 100%;

    position: relative;
    overflow: hidden;
    background-color: #fff;
    border-radius: 28px !important;
    border: 1px solid #e2e8f0;
}

.group-white-card.m3-user-card {
    display: flex;
    flex-direction: column;
}

.m3-user-header {
    position: relative;
    z-index: 2;
}

.m3-icon-badge {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--m3-primary-container);
    color: #21005d;
    border-radius: 12px;
    font-size: 1.1rem;
}

.m3-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: #1c1b1f;
}

/* Fix per Toggle JS */
.group-wrapper:has(.group-content[style*="display: none"]) .group-white-card {
    height: auto !important;
}

.background-icon-watermark {
    position: absolute;
    right: -10px;
    bottom: -10px;
    font-size: 3.5rem;
    opacity: 0.03;
    z-index: -1;
    color: var(--primary-link) !important;
    transition: all 0.5s ease;
}

.background-icon-watermark-large {
    position: absolute;
    left: -10px;
    top: 60%;
    transform: translateY(-50%) rotate(-10deg);
    font-size: 15rem;
    opacity: 0.03;
    color: var(--primary-color) !important;
    pointer-events: none;
    z-index: 1;

}

/* OLD 

.report-card-main-link {
    text-decoration: none !important;
    z-index: 2 !important;
    position: relative !important;
}

.report-card-title {
    color: #1e293b !important;
    font-weight: 700 !important;
    font-size: 1.1rem !important;
    line-height: 1.4;
    text-align: left !important;
    display: block !important;
}

.report-card-actions {
    position: relative !important;
    z-index: 3 !important;
    display: flex !important;
    flex-direction: row !important;
    justify-content: flex-end !important;
    align-items: center !important;
    gap: 8px !important;
    margin-top: auto !important;
    width: 100% !important;

}

.report-item-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.report-item-card:hover .background-icon-watermark {
    opacity: 0.1 !important;
    transform: scale(1.1) rotate(0deg);
}

.report-item-card {
    position: relative;
    z-index: 3;
    background: rgba(255, 255, 255, 0.8) !important;
    backdrop-filter: blur(2px);
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 8px;
}*/

.btn-view-standard {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px;
    padding: 8px 16px !important;
    background-color: rgba(26, 115, 232, 0.05) !important;
    color: var(--primary-link) !important;
    border: 1px solid rgba(26, 115, 232, 0.2) !important;
    border-radius: 20px !important;
    font-size: 0.85rem !important;
    font-weight: 600 !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.2s ease !important;
    text-decoration: none !important;
}

.btn-view-standard:hover {
    background-color: var(--primary-link) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 8px rgba(26, 115, 232, 0.3) !important;
    transform: translateY(-1px);
}

.btn-view-minimal {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: #1a73e8;
    color: white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: all 0.2s;
}

.uppercase-title {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #475569;
}

.count-badge-small {
    font-size: 0.7rem;
    background: #f1f5f9;
    color: #64748b;
    padding: 2px 8px;
    border-radius: 10px;
}

.report-list-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 35px 10px 35px;
    border-bottom: 1px solid #e2e8f0;
}

.report-list-row:last-child {
    border-bottom: none;
}

.report-main-info {
    display: flex;
    align-items: center;
    flex-grow: 1;
}

.report-row-icon-box {
    width: 25px;
    color: #0369a1;
    font-size: 0.9rem;
    padding-right: 30px;
}

.report-row-link {
    text-decoration: none;
    color: #1e293b;
    display: flex;
    align-items: center;
}

.report-row-title {
    font-weight: 500;
    font-size: 0.9rem;
}

.report-row-separator {
    margin: 0 8px;
    color: #cbd5e1;
}

.report-row-subtext {
    color: #94a3b8;
    font-size: 0.95rem;
}

.report-row-actions {
    display: flex;
    gap: 5px;
}

.section-title-internal {
    cursor: pointer;
    background: #ffffff;
    transition: background 0.2s;

}

.section-title-internal:hover {
    background: #f8fafc;
}

.group-content {
    display: block !important;
    overflow: hidden;
    padding-bottom: 12px;
}

.sub-category-section {
    padding-top: 20px;
}

.sub-category-section:last-child {
    border-bottom: none;
}

.sub-category-section:last-child .m3-divider {
    display: none;
}

.sub-category-header {
    transition: all 0.3s ease;
}

.sub-category-header.is-open {
    background-color: #f8fafc !important;
}

.sub-category-header.is-open span.fw-bold {
    color: var(--primary-color) !important;
}

.sub-category-header.is-open .badge {
    background-color: var(--primary-color) !important;
    color: white !important;
    border-color: var(--primary-color) !important;
}

.sub-category-header.is-open .arrow-icon {
    color: var(--primary-color) !important;
}

.m3-report-badge {
    color: #475569;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 2px;
}

/* Assicura che le card nella riga abbiano tutte la stessa altezza massima della riga */
.row-cols-xl-2>.col {
    display: flex;
}

.sub-category-header {
    border: none !important;
    padding-top: 12px !important;
    padding-bottom: 12px !important;
}

.sub-category-header i {
    color: #cbd5e1;
}

.sub-category-header:hover {
    background-color: rgba(0, 0, 0, 0.01) !important;
}

.analytics-empty-state,
.analytics-no-results {
    min-height: 400px !important;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.07) !important;
    border-radius: 20px !important;
    transition: border-color 0.3s ease !important;
}

/* 
.analytics-empty-state:hover {
    border-color: #3b82f6!important; 
}

.analytics-no-results:hover {
    border-color: #fbbf24!important; 
}*/

.icon-shape-container {
    position: relative;
    width: 100px;
    height: 100px;
}

.icon-shape-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #eff6ff;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-main {
    opacity: 0.85;
}

.pulse-ring {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #3b82f6;
    opacity: 0;
    z-index: 5;
    animation: pulse-rings 2.5s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
}

.pulse-ring.delaying {
    animation-delay: 1.25s;
}

@keyframes pulse-rings {
    0% {
        transform: scale(0.95);
        opacity: 0;
    }

    10% {
        opacity: 0.3;
    }

    80%,
    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

.bg-orange-light {
    background-color: #fff7ed !important;
    border: 1px solid #ffedd5;
}

.analytics-no-results .fa-solid {
    color: #f59e0b !important;
    opacity: 1 !important;
}

.icon-shape-bg {
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.offcanvas {
    z-index: 1040;
}

.offcanvas-backdrop {
    z-index: 1030;
    opacity: .5;
    top: 70px !important;
}

.filter-sticky-tab {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1010;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 12px 0 0 12px;
    padding: 12px 8px;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-sticky-tab:hover {
    padding-right: 15px;
    background-color: #0b5ed7;
    color: white;
}

.filter-sticky-tab i {
    margin-bottom: 8px;
    transform: rotate(90deg);
    font-size: 1.1rem;
}

.filter-sticky-tab span {
    font-weight: bold;
    font-size: 0.8rem;
    letter-spacing: 1px;
}

.bg-light {
    color: #64748b !important;
}

.map-label-style {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #334155;
    border-radius: 4px;
    padding: 1px 5px;
    font-size: 8px;
    font-weight: 800;
    color: #1e293b;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    pointer-events: none;
    white-space: nowrap;
}

.leaflet-editing-icon {
    width: 10px !important;
    height: 10px !important;
}

.leaflet-tooltip-top:before,
.leaflet-tooltip-bottom:before,
.leaflet-tooltip-center:before {
    display: none !important;
}

.leaflet-routing-container {
    display: none !important;
}

.clickable-row.selected .map-label-style {
    border-color: #000;
    transform: scale(1.2);
    z-index: 1000;
}

.offcanvas {
    top: 70px !important;
    height: calc(100% - 70px) !important;
    border-left: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: -5px 0 25px rgba(0, 0, 0, 0.05);
}


.custom-close {
    color: var(--primary-color);
    /* Qui prenderà il tuo #0d47a1 */
    transition: opacity 0.2s;
}

.custom-close:hover {
    opacity: 0.8;
}

body.offcanvas-open {
    overflow: hidden;
    padding-right: 0 !important;
}

.offcanvas-header {
    background-color: #f8f9fa;
    padding: 1rem 1.5rem;
}

/* --- FORM ELEMENTI --- */

.list-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    margin-bottom: 8px;
}

.list-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.category-node {
    position: relative;
}

.children-container {
    border-left: 1px dashed #cbd5e1;
    margin-left: 10px;
}

.scrollable-content {
    overflow-y: auto;
    flex-grow: 1;
    max-height: 400px;
}

.info-box-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    height: auto !important;
}

.info-box {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 6px;
    padding: 15px;
    height: auto !important;
    min-height: 180px;
}

#gtfsForm,
#xmlForm {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

#file-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

#file-list li {
    font-size: 11px;
    padding: 10px 0;
    color: #1e293b;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

label {
    font-size: 0.85em;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: block;
    margin-top: 15px;
}

input,
select,
textarea {
    padding: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.85em;
    outline: none;
    width: 100%;
    box-sizing: border-box;
    transition: 0.2s;
    font-family: inherit;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.1);
}

::-webkit-scrollbar {
    width: 7px;
    height: 7px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.08);
}

::-webkit-scrollbar-thumb {
    background-color: var(--slate-800);

}

::-webkit-scrollbar-thumb:hover {
    background: color-mix(in srgb, var(--slate-800) 80%, black);
}

.card ::-webkit-scrollbar,
.main-card ::-webkit-scrollbar,
.dataTables_wrapper ::-webkit-scrollbar {
    width: 9px;
    height: 9px;
}

.card ::-webkit-scrollbar-track,
.main-card ::-webkit-scrollbar-track,
.dataTables_wrapper ::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.08);
    border-radius: 10px;
}

.card ::-webkit-scrollbar-thumb,
.main-card ::-webkit-scrollbar-thumb,
.dataTables_wrapper ::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 10px;
    border: 2px solid rgba(255, 255, 255, 0.6);
}

.card ::-webkit-scrollbar-thumb:hover,
.main-card ::-webkit-scrollbar-thumb:hover,
.dataTables_wrapper ::-webkit-scrollbar-thumb:hover {
    background: color-mix(in srgb, var(--primary-color) 80%, black);
}

/*---------------------------------------------------------------------------------*/
/*                                    DATATABLE                                    */
/*---------------------------------------------------------------------------------*/

table.dataTable td,
table.dataTable th {
    white-space: nowrap;
}

.card,
.main-card,
.dataTables_wrapper {
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) rgba(0, 0, 0, 0.08);
}

table {
    border-collapse: collapse;
    border-spacing: 0;
    font-size: 12px;
    background-color: transparent;
}

.table {
    max-width: 100%;
    margin-bottom: 0px;

}

.table>thead>tr>th,
.table>tbody>tr>th,
.table>tfoot>tr>th,
.table>thead>tr>td,
.table>tbody>tr>td,
.table>tfoot>tr>td {
    padding: 13px;
    line-height: 1.42857143;
    vertical-align: middle;
    border-top: 1px solid #dfd7ca;
}

.table>thead>tr>th {
    vertical-align: bottom;
    border-bottom: 2px solid #dfd7ca;
}

.table>caption+thead>tr:first-child>th,
.table>colgroup+thead>tr:first-child>th,
.table>thead:first-child>tr:first-child>th,
.table>caption+thead>tr:first-child>td,
.table>colgroup+thead>tr:first-child>td,
.table>thead:first-child>tr:first-child>td {
    border-top: 0;
}

.table>tbody+tbody {
    border-top: 2px solid #dfd7ca;
}

.table .table {
    background-color: #ffffff;
}

.table-hover>tbody>tr:hover {
    background-color: #fbfbfb;
}

table col[class*="col-"] {
    position: static;
    float: none;
    display: table-column;
}

table td[class*="col-"],
table th[class*="col-"] {
    position: static;
    float: none;
    display: table-cell;
}

.table>thead>tr>td.active,
.table>tbody>tr>td.active,
.table>tfoot>tr>td.active,
.table>thead>tr>th.active,
.table>tbody>tr>th.active,
.table>tfoot>tr>th.active,
.table>thead>tr.active>td,
.table>tbody>tr.active>td,
.table>tfoot>tr.active>td,
.table>thead>tr.active>th,
.table>tbody>tr.active>th,
.table>tfoot>tr.active>th {
    background-color: #fbfbfb;
}

.dataTables_wrapper *,
table.dataTable,
table.dataTable th,
table.dataTable td {
    box-sizing: border-box !important;
}

table.dataTable {
    clear: both;
    margin-top: 6px !important;
    margin-bottom: 6px !important;
    max-width: none !important
}

table.dataTable td,
table.dataTable th {
    -webkit-box-sizing: content-box;
    -moz-box-sizing: content-box;
    box-sizing: content-box;
    text-align: center
}

table.dataTable.nowrap td,
table.dataTable.nowrap th {
    white-space: nowrap
}

div.dataTables_wrapper div.dataTables_length select {
    width: 75px;
    display: inline-block
}

div.dataTables_wrapper {
    padding: 15px;

}

div.dataTables_wrapper div.dataTables_filter {
    text-align: right
}

div.dataTables_wrapper div.dataTables_filter label,
div.dataTables_wrapper div.dataTables_length label {
    font-weight: 400;
    white-space: nowrap;
    text-align: left
}

div.dataTables_wrapper div.dataTables_info {
    padding-top: 8px;
    white-space: nowrap
}

div.dataTables_wrapper div.dataTables_paginate {
    margin: 20px 10px 20px 0;
    text-align: right
}

table.dataTable thead>tr>td.sorting,
table.dataTable thead>tr>td.sorting_asc,
table.dataTable thead>tr>td.sorting_desc,
table.dataTable thead>tr>th.sorting,
table.dataTable thead>tr>th.sorting_asc,
table.dataTable thead>tr>th.sorting_desc {
    padding-right: 20px;
    text-align: center
}

table.dataTable thead>tr>td:active,
table.dataTable thead>tr>th:active {
    outline: 0
}

table.dataTable thead .sorting,
table.dataTable thead .sorting_asc,
table.dataTable thead .sorting_asc_disabled,
table.dataTable thead .sorting_desc,
table.dataTable thead .sorting_desc_disabled {
    cursor: pointer;
    position: relative
}

table.dataTable thead .sorting:after {
    position: absolute;
    bottom: 12px;
    right: 1px;
    display: block;
}

table.dataTable thead .sorting_asc:after,
table.dataTable thead .sorting_asc_disabled:after,
table.dataTable thead .sorting_desc:after,
table.dataTable thead .sorting_desc_disabled:after {
    position: absolute;
    bottom: 12px;
    right: 8px;
    display: block;
    opacity: .5
}

table.dataTable thead .sorting:after {
    opacity: .2;
    content: "▲▼"
}

table.dataTable thead .sorting_asc:after {
    content: "▲"
}

table.dataTable thead .sorting_desc:after {
    content: "▼"
}

table.dataTable thead .sorting_asc_disabled:after,
table.dataTable thead .sorting_desc_disabled:after {
    color: var(--grey-light2)
}

div.dataTables_scrollBody table {
    border-top: none;
    margin-top: 0 !important;
    margin-bottom: 0 !important
}

div.dataTables_scrollBody table tbody tr:first-child td,
div.dataTables_scrollBody table tbody tr:first-child th {
    border-top: none
}

div.dataTables_scrollFoot table {
    margin-top: 0 !important;
    border-top: none
}


/* --- EFFETTO HOVER RIGHE --- */

.clickable-row {
    cursor: pointer;
}

.clickable-row:hover td {
    font-weight: bold !important;
    font-size: 1.01em;
    transition: all 0.2s ease;
}

#resTable tbody tr:hover td {
    background-color: var(--m3-primary-container) !important;
    color: var(--primary-color) !important;
    transition: background-color 0.15s ease-in-out;
}

table.dataTable.display tbody tr:hover>.sorting_1,
table.dataTable.order-column.hover tbody tr:hover>.sorting_1 {
    background-color: var(--m3-primary-container) !important;
}

.dt-buttons {
    margin-bottom: 15px;
    display: flex;
    gap: 8px;
}

.dt-button.btn {
    border-radius: 12px !important;
}

.dt-button {

    font-size: 0.75rem !important;
    font-weight: 700 !important;
    padding: 8px 16px !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    border: none !important;
    box-shadow: none !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dt-button.buttons-excel {
    background-color: #e8f5e9 !important;
    color: #1b5e20 !important;
}

.dt-button.buttons-pdf {
    background-color: #fce8e8 !important;
    color: #b71c1c !important;
}

.dt-button.buttons-print {
    background-color: #f1f5f9 !important;
    color: #475569 !important;
}

.dt-button:hover {
    filter: brightness(0.95);
    transform: translateY(-1px);
    opacity: 0.9 !important;
}

.dataTables_scrollFoot {
    border: none !important;
    background: transparent !important;
}

.dataTables_scrollFootInner table {
    border-top: none !important;
    margin-top: -1px !important;
}

#resTable tfoot tr {
    background-color: transparent !important;
}

#resTable tfoot td {
    padding: 0px 10px !important;
    font-weight: 700;
    color: var(--primary-color);
    font-size: 0.85rem;
    border: none !important;
    border-top: 2px solid #e2e8f0 !important;
}

.dataTables_filter {
    float: right;
    margin-bottom: 15px !important;
}

div.dataTables_wrapper div.dataTables_filter input {
    margin-left: .5em;
    display: inline-block;
    width: auto;
    padding: 7px;
}



/* --- ALERT E BADGES --- */

.alert {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.9em;
    font-weight: 500;
    border: 1px solid transparent;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-success {
    background: #dcfce7;
    color: #166534;
    border-color: #bbf7d0;
    margin: 20px 0;
    padding: 15px;
    border-radius: 12px;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border-color: #fecaca;
    margin: 20px 0;
    padding: 15px;
    border-radius: 12px;
}

.badge {
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.75em;
    font-weight: bold;
}

.badge-admin {
    background: #fee2e2;
    color: #991b1b;
}

.badge-user {
    background: #e0f2fe;
    color: #0369a1;
}

.badge-files {
    background: #f1f5f9;
    color: #64748b;
    font-size: 0.65rem;
    padding: 1px 6px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
}

.count-badge {
    background: #e2e8f0;
    color: #475569;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 800;
}

.line-row {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.2s;
}

.line-row:hover {
    background: #f8fafc;
}

.col-nome {
    flex: 0 0 180px;
    font-weight: 600;
    color: #1e293b;
    font-size: 0.9rem;
}

.col-path {
    flex-grow: 1;
    color: #64748b;
    font-family: monospace;
    font-size: 0.8rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.col-check {
    flex: 0 0 100px;
    text-align: right;
}

/* --- LAYOUT PRINCIPALE --- */

.main-content {
    margin-left: var(--sidebar-width);
    padding: 2rem;
    transition: all 0.3s ease;
}

.card div[style*="display: grid"],
.card div[style*="display: flex"] {
    display: flex !important;
    flex-wrap: wrap;
    gap: 20px;
}

.card div[style*="display: grid"]>div,
.card div[style*="display: flex"]>div {
    flex: 1;
    min-width: 300px;
}

/* --- AREA DOWNLOAD --- */

.grid-view .file-item .file-info {
    width: 100%;
    min-width: 0;
}

.grid-view .file-item .file-info .fw-bold {
    display: -webkit-box !important;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden !important;
    text-overflow: ellipsis;
    white-space: normal !important;
    word-break: break-word;
    overflow-wrap: anywhere;
    line-height: 1.25;
    max-height: 2.5em;
    width: 100%;
}

.grid-view .file-item {
    height: 100%;
    min-height: 160px;
    justify-content: center;
}

.drive-card {
    background: white;
    border-radius: 16px;
    border: 1px solid #e0e0e0;
    min-height: 70vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.drive-header {
    padding: 15px 24px;
    border-bottom: 1px solid #eee;
    background: #fafafa;
}

.files-container.grid-view {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    padding: 24px;
}

.grid-view .file-item {
    border: 1px solid #dadce0;
    border-radius: 10px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: background 0.2s;
    cursor: pointer;
    position: relative;
}

.grid-view .file-item:hover {
    background: #ffffff;
    border-color: #d1d4d9;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
    transition: all 0.2s ease;
}

.grid-view .file-icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.grid-view .file-item:hover .file-actions {
    display: flex;
}

.files-container.list-view {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.list-view .list-header {
    display: grid;
    grid-template-columns: var(--drive-grid-layout);
    padding: 12px 24px;
    border-bottom: 1px solid #eee;
    font-size: 0.85rem;
    font-weight: 600;
    color: #5f6368;
    align-items: center;
}

.list-view .file-item {
    display: grid !important;
    grid-template-columns: var(--drive-grid-layout);
    padding: 12px 24px;
    align-items: center;
    border-bottom: 1px solid #f1f1f1;
    transition: background 0.1s;
    text-decoration: none;
    color: inherit;
    gap: 0;
}

.list-view .file-item:hover {
    background: #ffffff;
    border-color: #d1d4d9;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
    transition: all 0.2s ease;
}

.list-view .file-icon {
    margin-right: 15px;
    width: 24px;
    text-align: center;
}

.layout-switcher {
    background: #f1f3f4;
    border-radius: 20px;
    padding: 2px;
}

.layout-btn {
    border: none;
    background: transparent;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: #5f6368;
}

.layout-btn.active {
    background: #e8f0fe;
    color: #1a73e8;
}

.list-view .list-only {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-right: 10px;
}

.grid-view .file-actions {
    position: absolute;
    top: 5px;
    right: 5px;
    display: none;
    gap: 8px;
}

.list-view .file-actions {
    grid-column: 4;
    justify-content: flex-end;
    display: flex !important;
    gap: 8px;
}

.list-view .file-info .list-only-text {
    font-size: 0.75rem;
    color: #70757a;
}

.custom-breadcrumb {
    background: transparent !important;
    padding: 10px 0 !important;
    font-size: 1.1rem;
    color: #5f6368;
    display: flex;
    align-items: center;
}

.btn.btn-outline-primary.rounded-pill:hover {
    color: var(--primary-link);
}

.custom-breadcrumb i {
    font-size: 0.9rem;
    margin: 0 8px;
    color: #bdc1c6;
}

.custom-breadcrumb a {
    color: #1a73e8;
    text-decoration: none;
    font-weight: 500;
}

.custom-breadcrumb span.active {
    color: #3c4043;
    font-weight: 400;
}

/* --- SIDEBAR E NAVBAR --- */

#sidebar {
    width: var(--sidebar-width);
    min-width: var(--sidebar-width) !important;
    height: calc(100vh - var(--navbar-height)) !important;
    position: fixed !important;
    top: var(--navbar-height);
    left: 0;
    background-color: #fff;
    border-right: 1px solid #e2e8f0;
    z-index: 1020;
    display: flex;
    flex-direction: column;
    transition: left 0.3s ease;
    box-shadow: 4px 0 12px rgba(0, 0, 0, 0.03) !important;
}

#sidebar.active {
    left: 0 !important;
}

.sidebar-slide-container {
    flex: 1 1 auto;
    position: relative;
    overflow: hidden;
}

.slide-panel {
    width: 50%;
    height: 100%;
    overflow-y: auto;
    padding: 20px 15px;
    padding-bottom: 60px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.sidebar-slide-container.slid .slide-wrapper {
    transform: translateX(-50%);
}

.panel-header {
    flex: 0 0 auto;
    z-index: 10;
    background-color: #fff;
}

.panel-body {
    flex: 1 1 auto;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 80px !important;
}

.slide-wrapper {
    overflow: hidden;
    display: flex;
    width: 200%;
    height: 100%;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.slide-panel .tab-style-btn {
    position: sticky;
    top: -15px;
    z-index: 10;
    color: var(--accent-blue) !important;
    opacity: 1;
    margin-bottom: 10px;
    border: none !important;

}

.no-transition {
    transition: none !important;
}

.detail-panel {
    display: none;
}

.detail-panel.active {
    display: block;
}

.btn-back {
    display: flex;
    align-items: center;
    padding: 10px;
    margin-bottom: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    cursor: pointer;
    color: #0d6efd;
    font-size: 0.75rem;
    font-weight: bold;
    border: none;
    width: 100%;
}

#sidebar .text-muted {
    color: #94a3b8 !important;
    font-size: 0.7rem;
    letter-spacing: 0.8px;
    padding-left: 15px;
    text-transform: uppercase;
    font-weight: 700;
}

#sidebar .text-report {
    color: #94a3b8 !important;
    font-size: 0.9rem;
    letter-spacing: 0.8px;
    padding-left: 0px;
    text-transform: uppercase;
    font-weight: 800;
}

#sidebar .text-secondary {
    font-size: 0.7rem;
    border-bottom: 1px solid #f0f0f0;
}

.nav-custom-link,
.sidebar-acc-btn,
.card-link-wrapper {
    display: flex !important;
    flex-direction: row !important;
    align-items: flex-start !important;
    flex-wrap: nowrap !important;
    white-space: normal !important;
    padding: 10px 15px !important;
    text-decoration: none !important;
}


.nav-custom-link i,
.sidebar-acc-btn i,
.card-icon-box {
    flex-shrink: 0 !important;
    margin-right: 15px !important;
    margin-top: 2px !important;
}

.card-title-text,
.nav-custom-link span,
.sidebar-acc-btn span,
#sidebar .text-truncate {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
    display: block !important;
    text-align: left !important;
    line-height: 1.4 !important;
}

.nav-custom-link {
    color: #64748b !important;
    font-weight: 500;
    font-size: 0.8rem;
    padding: 10px 18px 10px 25px !important;
    border-radius: 25px !important;
    margin-bottom: 4px;
    transition: all 0.2s ease-in-out;
    text-decoration: none !important;
    display: flex;
    align-items: center;
}

.nav-custom-link.active {
    background-color: var(--m3-primary-container) !important;
    color: var(--primary-color) !important;
    /* font-weight: 600;*/
}

.nav-custom-link.active .i-menu {
    color: var(--primary-link) !important;
}

.nav-custom-link:hover,
.nav-custom-link:hover i,
.nav-custom-link:hover .i-menu {
    color: var(--primary-link) !important;
    background: #EDF1F7 !important;
}

.btn-primary {
    background-color: var(--primary-color) !important;
    color: #ffffff !important;
}

/* Accordion */
.sidebar-acc-btn {
    background-color: transparent !important;
    color: #64748b !important;
    font-size: 0.8rem !important;
    font-weight: 500 !important;
    padding: 10px 18px 10px 25px !important;
    border: none !important;
    width: 100%;
    text-align: left;
    display: flex;
    align-items: center;
    border-radius: 25px !important;
    box-shadow: none !important;
}

/*
.sidebar-acc-btn:not(.collapsed) {
    color: var(--primary-link) !important;
    background-color: rgba(26, 115, 232, 0.08) !important;
}
.sidebar-acc-btn:not(.collapsed) i {
    color: var(--primary-link) !important;
}*/

.sidebar-mobile-header {
    background-color: var(--slate-800) !important;
    color: #fff;
    padding: 18px !important;
}

.sub-link {
    font-size: 0.77rem !important;
    padding: 8px 5px 8px 15px !important;
    margin-left: 5px;
    color: #94a3b8 !important;
}

.sidebar-divider {
    border-top: 1px solid #f1f5f9 !important;
    margin: 1rem 0;
    height: 1px;
    background-color: #e2e8f0;
}

.panel-body::-webkit-scrollbar {
    width: 4px !important;
}

.panel-body::-webkit-scrollbar-thumb {
    background: #dadce0 !important;
    border-radius: 10px !important;

}

.card-body {
    padding: 0.45rem !important;
}

.i-menu {
    width: 20px;
    text-align: center;
    color: var(--text-muted) !important;
    transition: color 0.2s;
    display: inline-block;
}


.navbar-slate {
    background-color: var(--slate-800) !important;
    height: 72px;
    /* border-bottom: 1px solid rgba(255, 255, 255, 0.1);*/
}

.transition-icon {
    display: inline-block;
    transition: transform 0.6s cubic-bezier(0.68, -0.6, 0.32, 1.6), opacity 0.3s;
    transform: rotate(0deg);
}

#sidebarTrigger.is-active .transition-icon {
    transform: rotate(90deg) !important;
}

#sidebarTrigger.is-active .transition-icon {
    scale: 1.1;
}

.brand-dot {
    width: 10px;
    height: 10px;
    background-color: var(--primary-link);
    border-radius: 3px;
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.4);
}


.nav-material-link {
    color: var(--text-slate-100) !important;
    font-weight: 500;
    font-size: 0.85rem;
    border-radius: 20px !important;
    transition: all 0.2s ease;
    opacity: 0.8;
    padding: 10px 20px !important;
}

.nav-material-link:hover {
    background-color: rgba(255, 255, 255, 0.1) !important;
    opacity: 1;
}

.nav-material-link.active {
    background-color: var(--slate-700) !important;
    color: var(--accent-blue) !important;
    opacity: 1;
}

.dropdown-menu-slate {
    background-color: var(--slate-900) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 12px !important;
    padding: 8px !important;
}

.dropdown-menu-slate .dropdown-item {
    color: var(--text-slate-100);
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 0.85rem;
    margin-top: 5px;
}

.dropdown-menu-slate .dropdown-item:hover {
    background-color: var(--slate-700);
    color: white;
}

.login-body .error-msg {
    background: #fee2e2;
    color: #dc3545;
    padding: 10px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 0.9em;
    text-align: center;
    border: 1px solid #fecaca;
}

.fs-5 {
    font-size: 1rem !important;
}

/*--- MODAL ---*/

#Modal .modal-content {
    border-radius: 28px !important;
    border: none !important;
    box-shadow:
        0 20px 25px -5px rgba(0, 0, 0, 0.1),
        0 10px 10px -5px rgba(0, 0, 0, 0.04) !important;
    padding: 12px;
}

#Modal .modal-body .d-flex {
    display: flex !important;
    gap: 12px !important;
    justify-content: center !important;
}

.btn-modal,
#Modal .modal-body .btn-custom-secondary,
#Modal .modal-body .btn-danger {
    flex: none !important;
    min-width: 100px !important;
    max-width: none !important;
    height: 40px !important;
    border-radius: 20px !important;
    /* Forma a pillola */
    padding: 0 24px !important;
    font-size: 0.875rem !important;
    font-weight: 600 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    border: none !important;
}

.btn-modal-cancel {
    background: #f1f5f9 !important;
    color: #64748b !important;
}

.btn-modal-delete {
    background: #ef4444 !important;
    color: white !important;
}

.btn-modal:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.modal-custom {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0);
    backdrop-filter: blur(0px);
    transition: all 0.3s ease;
    justify-content: center;
    align-items: center;
}

.modal-custom.active {
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(3px);
}

.modal-custom.active .modal-content {
    transform: scale(1);
    opacity: 1;
}

.btn-custom-secondary {
    background-color: #f1f5f9 !important;
    color: #475569 !important;
}

.btn-custom-danger {
    background-color: #ef4444 !important;
    color: white !important;
}

.btn-custom-secondary:hover {
    background-color: #e2e8f0 !important;
}

.btn-custom-danger:hover {
    background-color: #dc2626 !important;
}

body.modal-open {
    padding-right: 0 !important;
    overflow-y: scroll !important;
}


/* --- NAVBAR --- */

.navbar {
    box-shadow: 0 2px 3px 0 rgb(0 0 0 / 16%), 0 2px 3px 0 rgb(0 0 0 / 12%) !important;
    -webkit-box-shadow: 0 2px 3px 0 rgb(0 0 0 / 16%), 0 2px 3px 0 rgb(0 0 0 / 12%) !important;
    position: sticky;
    top: 0;
    padding: 12px 30px;
}

.navbar-toggler:focus,
.navbar-toggler:active,
.btn:focus,
.btn:active,
.dropdown-item:focus {
    outline: none !important;
    box-shadow: none !important;
}

.navbar-brand {
    font-size: 1.5rem !important;
    padding: 0;
    transition: transform 0.2s;
    color: #1e293b !important;
}

.navbar-brand i {
    font-size: 1.8rem;
}

.navbar-brand:hover {
    transform: scale(1.05);
}

.tabs-menu {
    display: flex;
    gap: 5px;
    border-bottom: 2px solid #e2e8f0;
    margin-bottom: 20px;
    overflow-x: auto;
    padding-bottom: 2px;
}

.tab-link {
    padding: 12px 25px;
    cursor: pointer;
    border-radius: 8px 8px 0 0;
    font-weight: 600;
    color: #64748b;
    transition: 0.2s;
    white-space: nowrap;
    border: 1px solid transparent;
}

.tab-link:hover {
    background: #f8fafc;
    color: var(--primary-color);
}

.tab-link.active {
    background: white;
    border: 1px solid #e2e8f0;
    border-bottom: 2px solid white;
    color: var(--primary-color);
    margin-bottom: -2px;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.sticky-title-container {
    position: sticky;
    top: -20px;
    background: #fff;
    z-index: 20;
    padding: 10px 0;
    border-bottom: 2px solid #f8f9fa;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#mini-map {
    height: 260px;
    border-radius: 10px;
    border: 1px solid #dee2e6;
    margin-bottom: 15px;
    z-index: 1;
}

/* --- BOX UPLOAD --- */

.file-upload-box {
    border: 2px dashed var(--m3-outline);
    /*#dee2e6*/
    border-radius: 24px;
    background: #f8f9fa;
    transition: all 0.2s;
    cursor: pointer;
    min-height: 250px!important;
    display: flex;
    flex-grow: 1;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: 20px;
}

.file-upload-box:hover {
    background: var(--m3-primary-container);
    border-color: var(--m3-primary);
}

#mini-map {
    height: 300px;
    width: 100%;
    border-radius: 10px;
    border: 1px solid var(--m3-outline);
    margin-top: 15px;
}

/* --- BOTTONI --- */

.btn-new-main {
    background: var(--m3-primary-container) !important;
    color: var(--m3-on-primary-container) !important;
    padding: 12px 24px;
    border-radius: 16px !important;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.btn-new-main:hover {
    background: #c2d7f7 !important;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
}

.btn-slate-logout {
    background-color: rgba(239, 68, 68, 0.15);
    /* Rosso trasparente */
    color: #f87171;
    /* border: 1px solid rgba(239, 68, 68, 0.3);*/
    font-weight: 600;
    font-size: 0.75rem;
    padding: 8px 20px;
    border-radius: 100px !important;
    transition: all 0.2s;
}

.btn-slate-logout:hover {
    background-color: #ef4444;
    color: white;
    border-color: #ef4444;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-logout {
    color: #dc3545;
    border: 1px solid #fee2e2;
    background: #fff;
    font-weight: 500;
}

.btn-logout:hover {
    background: #fee2e2;
    color: #b91c1c;
}


.form-check-input:checked {
    background-color: var(--primary-color);
    border-color: #0d6efd;
}

.btn {
    padding: 8px 20px;
    font-weight: 600;
    font-size: 0.85em;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: 0.3s;
    border: none;
    cursor: pointer;
    font-family: inherit;
    border-radius: 100px !important;
    text-decoration: none;
}

.tab-style-btn {
    padding: 8px 20px;
    border-radius: 100px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem;
    color: #444746;
    background: transparent;
    transition: 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
}

.tab-style-btn.active,
.tab-style-btn.btn-new-style {
    background: var(--m3-primary-container) !important;
    color: var(--m3-on-primary-container) !important;
}

.btn-view-standard {
    background: #f1f5f9;
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: 0.2s;
    border: 1px solid #e2e8f0;
}

.btn-view-standard:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(26, 115, 232, 0.2);
}

.btn-new {
    background: var(--primary-color) !important;
    color: white !important;
}

.btn-new:hover {
    background: #1557b0 !important;
    color: white !important;
}

.btn-upload {
    background: #10b981 !important;
    color: white !important;
}

.btn-conn {
    background: #f1f5f9;
    color: #475569 !important;
    border: 1px solid #e2e8f0;
}

.btn-conn:hover {
    background: #e2e8f0;
}

.btn-save {
    background: #10b981;
    color: white !important;
}

.btn-test {
    background: white !important;
    border: 1px solid #cbd5e1 !important;
}

.btn-danger,
.btn-confirm {
    background: #ef4444 !important;
    color: white !important;
}

.btn-cancel {
    background: #f1f5f9;
    color: #64748b !important;
    border: 1px solid #e2e8f0;
}

.btn-logout {
    color: #dc3545 !important;
    font-weight: bold;
    font-size: 0.9em;
    padding: 8px 12px;
    border-radius: 6px;
    transition: 0.2s;
}

.btn-logout:hover {
    background: #fee2e2;
}

.btn-min {
    width: 30px;
    height: 30px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    text-decoration: none;
    font-size: 0.85rem;
    transition: 0.2s;
    flex-shrink: 0 !important;
}

.btn-min.edit {
    background: #f1f5f9;
    color: #64748b;
}

.btn-min.delete {
    background: #fff1f2;
    color: #ef4444;
}

.btn-min.download {
    background: #eff6ff;
    color: var(--primary-color);
}

/*.btn-min.clone { background: #f5f3ff; color: #8b5cf6; }*/
.btn-min.clone {
    background: #f0f9ff;
    color: #0369a1;
}

.header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 35px;
}

.view-switcher,
.tabs-menu-alt {
    display: flex;
    background: #e9eef6;
    padding: 4px;
    border-radius: 100px;
    /* Pill shape container */
    gap: 4px;
    border: none;
    width: fit-content;
}

.btn-min:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.btn-min.edit:hover {
    background: #e2e8f0;
    color: #334155;
}

.btn-min.clone:hover {
    background: #e0f2fe;
    color: #075985;
}

.btn-min.download:hover {
    background: #dbeafe;
    color: #1e40af;
}

.btn-min.delete:hover {
    background: #ffe4e6;
    color: #be123c;
}

.btn-min:active {
    transform: translateY(0);
    box-shadow: none;
}

.btn-del-cat {
    font-size: 0.75rem;
    font-weight: 700;
    color: #94a3b8;
    border: 1px solid #e2e8f0;
    padding: 5px 12px;
    border-radius: 6px;
    background: white;
    cursor: pointer;
    transition: 0.2s;
}

.btn-del-cat:hover {
    border-color: #fecaca;
    color: #ef4444;
    background: #fff1f2;
}

.header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 35px;
}

/* --- LAYOUT E CARDS --- */

.card {
    background: white;
    padding: 30px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
    margin-bottom: 30px;
}

.card-link-wrapper {
    display: flex;
    align-items: center;
    text-decoration: none;
    width: 100%;
}

.card-actions {
    display: flex;
    gap: 8px;
    align-self: flex-end;
    margin-top: 15px;
}

.card-icon-box {
    width: 45px;
    height: 45px;
    background: #eff6ff;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    margin-right: 18px;
    flex-shrink: 0;
    font-size: 1.2rem;
}

.card-title-text {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 0.95rem;
    text-transform: uppercase;
    line-height: 1.4;
    word-break: break-word;
    padding-top: 7px;
}

.card-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
    align-items: center;
}

.empty-state-card {
    grid-column: 1 / -1;
    background: #ffffff;
    border: 2px dashed #e2e8f0;
    padding: 30px;
    border-radius: 14px;
    text-align: center;
    color: #94a3b8;
    font-style: italic;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

/*--- SEZIONI ---*/

.view-section,
.tab-content {
    display: none;
    animation: fadeIn 0.4s ease;
}

.view-section.active,
.tab-content.active {
    display: block;
}

.section-title {
    margin: 40px 0 15px;
    border-bottom: 2px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    user-select: none;
    transition: background 0.2s;
    padding: 10px;
}

.title-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.title-left h3 {
    margin: 0;
    color: #1e293b;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* --- SPECIFICI: LISTA REPORT --- */

.group-section-header {
    margin: 40px 0 20px 0;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #64748b;
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 800;
}

.group-section-header::after {
    content: "";
    height: 2px;
    background: #e2e8f0;
    flex-grow: 1;
}


.map-card {
    display: block;
    padding: 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    text-decoration: none;
    color: #334155;
    margin-bottom: 10px;
    transition: 0.3s;
}

.tab-card {
    background: #fff;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    transition:
        transform 0.2s,
        box-shadow 0.2s;
    cursor: pointer;
}

.map-card:hover,
.report-card:hover {
    transform: translateY(-3px);
    /* border-color: var(--primary-color);*/
    background: white;
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.05);
}

.tab-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.report-link {
    text-decoration: none;
    color: inherit;
    z-index: 2;
    flex-grow: 1;
}

.report-title {
    font-weight: bold;
    font-size: 1.1em;
    display: block;
    margin-bottom: 5px;
    color: #0f172a;
}

.report-meta {
    font-size: 0.85em;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 5px;
}

.icon-bg {
    position: absolute;
    right: -10px;
    bottom: -10px;
    font-size: 60px;
    color: rgba(0, 0, 0, 0.03);
    z-index: 1;
    pointer-events: none;
}


.admin-actions {
    margin-top: 15px;
    display: flex;
    gap: 15px;
    border-top: 1px solid #e2e8f0;
    padding-top: 12px;
    z-index: 3;
    align-items: center;
}

.action-item {
    font-size: 0.85em;
    font-weight: 600;
    text-decoration: none !important;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    line-height: 1;
    cursor: pointer;
    transition: 0.2s;
}

.btn-edit-link {
    color: var(--primary-color) !important;
}

.btn-delete-link {
    color: #ef4444 !important;
}

/* --- SPECIFICI: DESIGNER --- */

.sql-main {
    font-family: "Cascadia Code", monospace;
    font-size: 0.9em;
    background: #fdfdfd;
    min-height: 250px;
    resize: vertical;
    border: 1px solid #cbd5e1;
}

.sql-filter {
    font-family: "Cascadia Code", monospace;
    background: #ffffff;
    min-height: 110px;
    resize: vertical;
    font-size: 0.8em;
    border: 1px solid #cbd5e1;
    resize: vertical;
}


.sql-hint {
    font-size: 0.78em;
    color: #92400e;
    margin-top: 8px;
    background: #fffbeb;
    padding: 8px 12px;
    border-radius: 6px;
    display: block;
    font-family: "Cascadia Code", monospace;
    border: 1px solid #fde68a;
    border-left: 4px solid #f59e0b;
    line-height: 1.4;
}

.mult-check input[type="checkbox"] {
    width: 18px !important;
    height: 18px !important;
    margin: 0 !important;
    cursor: pointer;
}

.chart-config-box {
    color: #0369a1;
    background: #f0f9ff;
    border-radius: 6px;
    display: block;
    border-left: 4px solid #0ea5e9;
    line-height: 1.4;
    padding: 20px;
    margin-top: 25px;
}


.f-header {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}

.f-number {
    background: var(--primary-color);
    color: white;
    font-size: 0.7rem;
    font-weight: 800;
    padding: 4px 12px;
    border-radius: 100px;
}

.f-row:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.f-row {
    background: #f8fafc;
    padding: 20px;
    margin-bottom: 25px;
    /*border-radius: 10px;*/
    border-radius: 0 10px 10px 0;
    border-left: 4px solid var(--primary-color);
}

.actions-bar-container {
    position: sticky;
    bottom: 0;
    background: white;
    padding: 15px;
    border-top: 1px solid #e2e8f0;
    z-index: 900;
    box-shadow: 0 -5px 10px rgba(0, 0, 0, 0.05);
    margin-left: 280px;
    width: calc(100% - 280px);
    transition: all 0.3s ease;
}

.actions-bar-content {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0px;
    display: flex;
    justify-content: space-between;
    align-items: center;

    width: 100%;
}

.report-header {
    position: fixed;
    /*top: 70px;*/
    left: 280px;
    right: 0;
    z-index: 1000;
    background: white;
    padding: 10px 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.report-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

/* --- SPECIFICI: VIEW REPORT (LAYOUT CORE) --- */

.app-container {
    display: flex;
    height: calc(100vh - 72px);
    overflow: hidden;
}

.sidebar-card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    background: white;
}

.filter-label {
    font-weight: 600;
    font-size: 0.75rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.main-card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    background: white;
    overflow: hidden;
}


.view-header h2 {
    font-weight: 700;
    color: #0f172a;
}

#map {
    border: 1px solid var(--m3-outline);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    height: calc(95vh - 190px);
    width: 100%;
    border-radius: 10px;
    border: 1px solid #ddd;
    z-index: 1;
    background: #f8fafc;
}

.map-legend-overlay {
    position: absolute;
    bottom: 30px;
    left: 20px;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.9);
    padding: 12px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    font-size: 12px;
    border: 1px solid #e2e8f0;
}

.main-content {
    flex-grow: 1;
    overflow-y: auto;
    background: #f4f7f9;
}


.btn-conn.active {
    background: white;
    color: var(--primary-color) !important;
    border-color: #e2e8f0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    /* background-color: #f0f7ff !important;
    color: var(--primary-color) !important;
    border: 1px solid var(--primary-color);*/
}

.view-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 0;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    margin-bottom: 0 !important;
}

.view-header h2 {
    margin: 0;
    font-size: 1.6em;
    color: #0f172a;
    font-weight: 700;
}

.view-header .btn-conn {
    background: white !important;
    border: 1px solid #cbd5e1 !important;
}



/* --- BOTTONE RUN SIDEBAR --- */

.btn-run {
    width: 100%;
    background: var(--primary-color);
    color: white !important;
    border: none;
    padding: 12px;
    border-radius: 8px;
    margin-top: 25px;
    cursor: pointer;
    font-weight: bold;
    font-size: 0.95em;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: 0.3s;
    box-shadow: 0 4px 6px rgba(26, 115, 232, 0.2);
}

.btn-run:hover {
    background: #1557b0;
    transform: translateY(-1px);
    box-shadow: 0 6px 12px rgba(26, 115, 232, 0.3);
}

/* --- ICONE AZIONI NELLE TABELLE (Admin Users / Connections) --- */

.action-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    transition: 0.2s;
    cursor: pointer;
    border: none;
    background: transparent;
    font-size: 1.1em;
    text-decoration: none !important;
}

.btn-edit-icon {
    color: var(--primary-color) !important;
}

.btn-edit-icon:hover {
    background: rgba(26, 115, 232, 0.1);
}

.btn-del-icon {
    color: #ef4444 !important;
}

.btn-del-icon:hover {
    background: rgba(239, 68, 68, 0.1);
}

td .action-icon+.action-icon {
    margin-left: 8px;
}

/* --- GRIGLIA FORM --- */

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.full-width {
    grid-column: span 2;
}

.db-info {
    font-family: monospace;
    color: #0369a1;
    background: #f0f9ff;
    padding: 3px 8px;
    border-radius: 6px;
    border: 1px solid #e0f2fe;
    font-size: 0.9em;
}

.sidebar-card.sticky-lg-top {
    top: 90px !important;
    z-index: 900 !important;
}

/* --- LOADING ANIMATION --- */

#page-loader {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

#page-loader.hidden {
    opacity: 0;
    visibility: hidden;
}

/* Container: rotazione costante */
.md-spinner-container {
    width: 64px;
    height: 64px;
    animation: pixel-rotate 2.4s linear infinite;
}

/* Cerchio: doppia animazione (movimento + colore) */
.md-spinner-svg circle {
    stroke-width: 4;
    stroke-linecap: round;
    fill: none;
    stroke-dasharray: 1, 200;
    stroke-dashoffset: 0;
    animation:
        pixel-dash 1.6s cubic-bezier(0.4, 0, 0.2, 1) infinite,
        color-change 6s ease-in-out infinite,
        pixel-fade-in 0.5s ease-out;
    stroke: var(--primary-color);
}

/* Animazione per l'entrata morbida */
@keyframes pixel-fade-in {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Rotazione del blocco */
@keyframes pixel-rotate {
    100% {
        transform: rotate(360deg);
    }
}

/* Movimento elastico (tipico Google) */
@keyframes pixel-dash {
    0% {
        stroke-dasharray: 1, 200;
        stroke-dashoffset: 0;
    }

    50% {
        stroke-dasharray: 100, 200;
        stroke-dashoffset: -15px;
    }

    100% {
        stroke-dasharray: 100, 200;
        stroke-dashoffset: -125px;
    }
}

/* Cambio colore fluido */
/*@keyframes color-change {
 /* 0%   { stroke: #4285F4; } /* Blu */
/* 25%  { stroke: #DE3E35; } /* Rosso */
/* 50%  { stroke: #F7C223; } /* Giallo */
/* 75%  { stroke: #1B9A59; } /* Verde */
/* 100% { stroke: #4285F4; } /* Blu */
/*} 



@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
*/


@media (max-width: 400px) {

    .login-logo h2 {
        font-size: 1.3rem;
    }

    .login-card {
        padding: 20px;
    }

}

body.loading-active {
    overflow: hidden;
}

/* --- LOGIN --- */


body.login-body {
    background: var(--m3-nav-bg);
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 15px;
}

.login-container {
    width: 100%;
    max-width: 400px;
}

.login-card {
    background: var(--m3-surface);
    padding: 48px;
    border-radius: 32px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    width: 100%;
    animation: m3FadeIn 0.5s ease-out;
}


.login-logo h2 {
    padding: 15px;
    font-weight: bold !important;
    font-size: 2.1rem;
}

.fw-light {
    font-weight: bold !important;

}

.form-control-custom {
    width: 100%;
    padding: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    display: block;
    font-size: 16px;
}

.form-group {
    margin-bottom: 20px;
}

.btn-login {
    width: 100%;
    background: var(--primary-link);
    color: white;
    border: none;
    padding: 14px;
    border-radius: 100px;
    /* Pill-shape */
    cursor: pointer;
    font-weight: 700;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(11, 87, 208, 0.2);
}

.btn-login:hover {
    background: #0842a0;
    box-shadow: 0 8px 16px rgba(11, 87, 208, 0.3);
    transform: translateY(-1px);
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mult-check {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 10px;
    cursor: pointer;
    margin-top: 15px;
    padding: 10px;
    width: fit-content !important;
    text-transform: none !important;
}

.admin-section {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
    height: var(--admin-height);
    overflow-y: auto;
}

.list-accordion {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    margin-top: 20px;
    overflow: hidden;
}

.list-header {
    background: #f8fafc;
    padding: 12px 20px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: 0.2s;
}

.list-header:hover {
    background: #f1f5f9;
}

.list-content {
    display: none;
    padding: 20px;
    border-top: 1px solid #e2e8f0;
}

.inner-tabs {
    display: flex;
    gap: 5px;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 15px;
    overflow-x: auto;
}

.inner-tab {
    padding: 8px 15px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    color: #64748b;
    border-bottom: 2px solid transparent;
}

.inner-tab.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.tab-pane {
    display: none;
}

.file-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid #f8fafc;
}

.file-row:last-child {
    border-bottom: 0;
}

.group-header {
    margin: 20px 0 20px 0;
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    background: transparent;
    border: none;
    padding: 10px 0;
    width: 100%;
    transition: 0.2s;
}

.group-header span {
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.8em;
    white-space: nowrap;
}

.group-header::after {
    content: "";
    height: 2px;
    background: #e2e8f0;
    flex-grow: 1;
}

.group-header .arrow-icon {
    order: 3;
    color: #94a3b8;
    transition: transform 0.3s ease;
}

.group-header.active {
    border-bottom: none;
}

.f-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    position: relative;
}

.btn-remove-f {
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    font-size: 1.2rem;
    padding: 5px;
    transition: 0.2s;
    line-height: 1;
}

.btn-remove-f:hover {
    color: #ef4444;
    transform: scale(1.1);
}

.ajax-filter {
    padding-top: .35rem !important;
    padding-bottom: .5rem !important;
}

.filter-item {
    margin-bottom: 15px;
}

.filter-item label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #475569;
    font-size: 0.85rem;
}

.filter-select {
    width: 100%;
    padding: 8px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: white;
}

.sidebar-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 25px;
}

.btn-reset {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #cbd5e1;
    padding: 10px;
    border-radius: 6px;
    text-align: center;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-reset:hover {
    background: #e2e8f0;
    color: #1e293b;
}

.dropdown-check-list {
    display: block;
    width: 100%;
    position: relative;
    font-family: inherit;
}

.accordion-item {
    background-color: #f8f9fa;
    /* Grigio chiarissimo */
    padding: 8px 15px;
    margin-top: 10px;
    font-size: 0.7rem;
    font-weight: 700;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 4px;
}

.dropdown-check-list .anchor {
    position: relative;
    cursor: pointer;
    display: block;
    padding: 6px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #fff;
    color: #334155;
    font-size: 0.85rem;
}

.form-control {
    font-size: 0.85rem !important;
    padding: 0.475rem 0.75rem !important;
}

.form-select {
    font-size: 0.85rem !important;
}

.form-control-sm {
    padding: 0.45rem 0.5rem !important;
}

.dropdown-check-list .anchor:after {
    position: absolute;
    content: "";
    border-left: 2px solid #64748b;
    border-top: 2px solid #64748b;
    padding: 3px;
    right: 15px;
    top: 35%;
    transform: rotate(-135deg);
}

.dropdown-check-list ul.items {
    padding: 5px 0;
    display: none;
    margin: 0;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    position: absolute;
    width: 100%;
    background: #fff;
    z-index: 9999;
    max-height: 250px;
    overflow-y: auto;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    margin-top: 5px;
}

.dropdown-check-list ul.items li {
    list-style: none;
    padding: 0;
    margin: 0;
}

.dropdown-check-list ul.items li label {
    cursor: pointer;
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    padding: 10px 15px !important;
    width: 100%;
    margin: 0 !important;
    transition: background 0.2s;
    text-align: left !important;
}

.dropdown-check-list ul.items li:hover {
    background: #f8fafc;
}

.dropdown-check-list ul.items li input[type="checkbox"] {
    width: 18px !important;
    height: 18px !important;
    margin: 0 !important;
    flex-shrink: 0;
    cursor: pointer;
}

.dropdown-check-list.visible ul.items {
    display: block;
}

/*--- DIVIDER ACCORDION ---*/

.driver-divider {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 5px 0 15px 0;
    padding-left: 12px;
    cursor: pointer;
}

.divider-label {
    font-size: 1rem;
    font-weight: 800;
    text-transform: uppercase;
    color: #1e293b;
}

.divider-line {
    flex: 1;
    height: 1px;
    background: #e2e8f0;
    margin-left: 15px;
}

.divider-count {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    height: 24px;
    border-radius: 50rem;
    font-size: 0.75rem;
    font-weight: bold;
    background: #f1f5f9;
    color: #64748b;
    padding: 2px 10px;
    margin-left: 10px;
}

.btn-action-minimal {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    width: 35px;
    height: 35px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.btn-action-minimal:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

/*--- LOG CONTAINER ---*/

#console-section {
    padding: 0;
    overflow: hidden;
    margin-top: 30px;
    border-radius: 8px;
}

#console-header {
    padding: 12px 20px;
    background: var(--slate-800)!important;
    color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#log-container {
    background: #0f172a;
    height: 470px;
    overflow-y: scroll;
    padding: 20px;

}

#log-output {
    color: #34d399;
    font-family: "Consolas", "Monaco", monospace;
    font-size: 13px;
    line-height: 1.6;
    margin: 0;
    white-space: pre-wrap;
    word-wrap: break-word;
}

#log-container::-webkit-scrollbar {
    width: 8px;
}

#log-container::-webkit-scrollbar-track {
    background: #0f172a;
}

#log-container::-webkit-scrollbar-thumb {
    background: #34d399;
    border-radius: 10px;
    border: 2px solid #0f172a;
}

#log-container::-webkit-scrollbar-thumb:hover {
    background: #10b981;
}

#log-container::-webkit-scrollbar-button {
    display: none;
    height: 0;
    width: 0;
}

.status-indicator{
 font-weight: 600;
    font-size: 0.8rem;
    border-radius: 20px !important;
    transition: all 0.2s ease;
    opacity: 0.8;
    padding: 10px 20px !important;
}
.status-indicator.run{
   background-color: var(--slate-700) !important;
    color: var(--accent-blue) !important;
    opacity: 1;
}
.status-indicator.success{
 background-color: rgba(16, 185, 129, 0.15)!important;
    color: #10b981!important;
	opacity: 1;
}

.bg-primary {
    background-color: var(--primary-color) !important;
}

/*--- FORM STYLING ---*/

.input-group {
    margin-bottom: 15px;
}

.input-group label {
    display: block;
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 5px;
    color: #475569;
}

.input-group input,
.input-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-family: inherit;
}

.arrow-icon {
    margin-left: 10px;
    transition: transform 0.3s;
    color: #cbd5e1;
}

.btn-full {
    width: 100%;
    justify-content: center;
}

.split-container {
    display: flex;
    gap: 25px;
    align-items: stretch;
    width: 100%;
    margin-top: 20px;
    flex-wrap: nowrap;
}

/*--- COLONNA DESTRA ---*/

.list-side {
    flex: 1;
    min-width: 0;
}

.list-side .info-box {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    margin-bottom: 0;
}

.file-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 15px;
}

.file-card,
.server-card,
.user-card,
.file-card {
    background: #fff;
    padding: 15px;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    transition:
        transform 0.2s,
        box-shadow 0.2s;
    gap: 15px;
}

.file-card:hover,
.server-card:hover,
.user-card:hover,
.file-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.info-box {
    background: #fff;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    margin-bottom: 10px;
    transition:
        transform 0.2s,
        box-shadow 0.2s;
}

.info-box:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.info-box h4 {
    margin: 0 0 15px 0;
    font-size: 0.85rem;
    color: #1e40af;
    border-bottom: 1px solid #eff6ff;
    padding-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-box .scrollable-content {
    flex: 1;
    overflow-y: auto;
    padding-right: 5px;
}

.info-box ::-webkit-scrollbar {
    width: 6px;
}

.info-box ::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

.list-side .admin-section {
    display: flex;
    flex-direction: column;
    gap: 15px;
    height: var(--admin-height);
}

.admin-section h3.sticky-title {
    position: sticky;
    top: -20px;
    background: #fff;
    z-index: 20;
    padding: 15px 0 20px 0;
    border-bottom: 2px solid #f8f9fa;
    margin-bottom: 20px;
}

.admin-section::-webkit-scrollbar {
    width: 10px;
}

.admin-section::-webkit-scrollbar-track {
    background: #f8fafc;
}

.admin-section::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
    border: 2px solid #f8fafc;
}

.admin-section::-webkit-scrollbar-button:single-button {
    background-color: #f8fafc;
    display: block;
    height: 12px;
    background-size: 10px;
    background-repeat: no-repeat;
}

.admin-section::-webkit-scrollbar-button:single-button:vertical:decrement {
    background-position: center bottom;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='100' height='100' fill='%2364748b'><polygon points='50,0 0,100 100,100'/></svg>");
}

.admin-section::-webkit-scrollbar-button:single-button:vertical:increment {
    background-position: center top;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='100' height='100' fill='%2364748b'><polygon points='0,0 100,0 50,100'/></svg>");
}

/*--- COLONNA SINISTRA ---*/

.config-side {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.config-side .card {
    margin: 0;
    width: 100%;
    height: 100%;
    /* Pareggia l'altezza della sezione a destra */
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px;
    display: flex;
    flex-direction: column;
}

.list-side .admin-section {
    display: flex;
    flex-direction: column;
    gap: 15px;
    overflow-y: auto;
}

.config-side .card:last-child {
    flex: 1;
}

/*--- MENU ---*/

.dropdown {
    position: relative;
    display: inline-block;
    border-radius: 8px;
}

.dropdown-toggle {
    cursor: pointer;
    border: none;
    outline: none;
}

.dropdown-content {
    display: block;
    position: absolute;
    right: 0;
    background-color: #ffffff;
    min-width: 180px;
    box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    border-radius: 8px;
    margin-top: 10px;
    border: 1px solid #e2e8f0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.dropdown-content a {
    color: #334155;
    padding: 12px 16px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    transition: background 0.2s;
}

.dropdown-content a i {
    width: 20px;
    text-align: center;
    color: #64748b;
}

.dropdown-content a:hover {
    background-color: #f1f5f9;
    color: var(--primary-color);
}

.dropdown-content a:hover i {
    color: var(--primary-color);
}

.dropdown-content a.active {
    background-color: #eff6ff;
    color: var(--primary-color);
    font-weight: 600;
}

.dropdown:hover .dropdown-content {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-content::before {
    content: "";
    position: absolute;
    top: -6px;
    right: 20px;
    width: 10px;
    height: 10px;
    background: white;
    transform: rotate(45deg);
    border-left: 1px solid #e2e8f0;
    border-top: 1px solid #e2e8f0;
}

/*--- LEAFLET ---*/

.leaflet-control-layers {
    border: none !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15) !important;
    border-radius: 10px !important;
    padding: 8px 12px !important;
}

.leaflet-control-layers-list label {
    display: flex !important;
    align-items: center !important;
    gap: 8px;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    margin-bottom: 4px;
    white-space: nowrap;
}

.leaflet-control-layers-selector {
    margin: 0 !important;
    cursor: pointer;
    width: 16px;
    height: 16px;
}

.legend-blob {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 5px;
    border: 1px solid rgba(0, 0, 0, 0.2);
}

.map-legend-overlay {
    position: absolute;
    bottom: 30px;
    left: 40px;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.9);
    padding: 10px;
    border-radius: 4px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
    max-width: 250px;
    font-size: 12px;
    border: 1px solid #999;
    pointer-events: auto;
}

/*--- MEDIA QUERIES ---*/

@media (min-width: 992px) {
    .config-side {
        min-width: 360px;
    }

    .info-box-container {
        height: 100% !important;
        overflow: hidden;
    }

    .info-box {
        flex: 1;
        height: 0 !important;
        min-height: 0;
    }

    .scrollable-content {
        max-height: none;
        flex-grow: 1;
    }

    .equal-height-row {
        display: flex;
        align-items: stretch;
        min-height: var(--admin-height);
        height: auto;
    }

    .config-side,
    .list-side {
        height: auto;
    }

    .config-side .card,
    .list-side .admin-section {
        height: 100%;
        display: flex;
        flex-direction: column;
    }

    #sidebar {
        left: 0 !important;
    }

    .sidebar-slide-container.slid:has(.detail-panel.active.d-lg-none) .slide-wrapper {
        transform: none !important;
    }

    .main-content {
        margin-left: 280px;
        padding-top: 20px;
        width: calc(100% - 280px);
    }

    .navbar-nav .nav-item .btn-light {
        background-color: transparent;
        border-color: transparent;
        color: #64748b;
    }

    .navbar-nav .nav-item .btn-light:hover {
        background-color: #f8fafc;
        color: #1a73e8;
    }

    .navbar {
        z-index: 1050 !important;
    }

    .navbar-nav .nav-item.dropdown .btn-primary.dropdown-toggle::after {
        border-top-color: #1a73e8;
    }

    .container-fluid {
        padding-left: 20px !important;
        padding-right: 20px !important;
    }

    .navbar-nav .nav-item .btn-sm {
        min-width: 120px;
        justify-content: center;
        display: flex;
        align-items: center;
        padding: 10px 15px !important;
        margin: 0 4px !important;
        border-radius: 8px !important;
        font-size: 14px !important;
        font-weight: 600 !important;
    }

    .navbar-nav .nav-item.dropdown .dropdown-menu {
        display: block;
        visibility: hidden;
        opacity: 0;
        transform: translateY(10px);
        transition: all 0.3s ease-in-out;
        margin-top: 0;
        pointer-events: none;
    }

    .navbar-nav .nav-item.dropdown:hover .dropdown-menu {
        visibility: visible;
        opacity: 1;
        transform: translateY(0);
        pointer-events: auto;
    }

    .dropdown-menu-end {
        right: 0 !important;
        left: auto !important;
    }

    .dropdown-menu::before {
        content: "";
        position: absolute;
        top: -10px;
        left: 0;
        width: 100%;
        height: 10px;
    }

    .dropdown-item {
        color: #64748b;
    }

    .dropdown-item.active,
    .dropdown-item:active {
        background-color: var(--slate-700) !important;
        color: var(--accent-blue) !important;
        font-weight: 600;
    }

    .dropdown-item:hover {
        background-color: var(--slate-700) !important;
        color: var(--accent-blue) !important;
    }

    .dropdown-item.active {
        /* border-left: 3px solid #1a73e8;*/
        padding-left: calc(var(--bs-dropdown-item-padding-x) - 3px);
    }
}

@media (max-width: 991.98px) {

    .report-list-row {
        padding: 13px 10px 13px 10px;
    }

    .card div[style*="display: grid"]>div,
    .card div[style*="display: flex"]>div {
        min-width: 100% !important;
    }

    form[style*="display: contents"] {
        display: block !important;
        width: 100%;
    }

    #sidebar .sidebar-mobile-header {
        background-color: var(--slate-800);
        color: white;
        top: 0;
        bottom: 0;
    }

#sidebar {
        position: fixed !important;
        bottom: 0;
        left: -100% !important; /* Di base è totalmente nascosta a sinistra */
        width: 50% !important;  /* Occupa tutto lo schermo quando si apre */
        height: 100vh !important;
        max-height: 100vh !important;
        z-index: 1041; /* Sopra le card e sopra la navbar */
        overflow: hidden;
        transition: left 0.3s ease; /* Slitta fluidamente quando premi il tasto */
    }

    /* QUANDO AGGIUNGI LA CLASSE CON IL TASTO (JS o Bootstrap) */
    #sidebar.open, #sidebar.active, #sidebar.show { 
        left: 0 !important; /* Entra a schermo coprendo le card */
    }

    /* Gestione dello scroll interno per il mobile/landscape */
    .sidebar-slide-container {
        flex-grow: 1;
        height: calc(100vh - 65px) !important;
        overflow: hidden;
    }
    .slide-wrapper {
        height: 100% !important;
    }
    .slide-panel {
        height: 100% !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch;
    }
    .slide-panel.d-flex {
        display: flex !important;
        flex-direction: column;
    }
    .panel-body {
        overflow-y: auto !important;
        flex-grow: 1;
    }

    .list-side .info-box {
        min-height: 150px;
    }

    .report-header {
        left: 0;
        width: 100%;
    }

    .panel-header {
        padding: 30px 0 25px 35px !important;
    }

    .tab-style-btn {
        width: 100% !important;
        justify-content: center !important;
        /* display: flex !important;*/
    }

    .actions-bar-container {
        margin-left: 0 !important;
        width: 100% !important;
        padding: 10px;
    }

    .actions-bar-content {
        flex-direction: column !important;
        /* Bottoni uno sopra l'altro */
        gap: 10px !important;
    }

    .actions-bar-content div[style*="display: flex"] {
        flex-direction: column !important;
        width: 100% !important;
        gap: 10px !important;
    }


    .navbar-brand {
        font-size: 1.3rem !important;
    }

    .navbar-brand i {
        font-size: 1.5rem;
    }

    .navbar-toggler {
        margin-right: 0 !important;
        padding-right: 0 !important;
        border: none !important;
    }

    .navbar-nav .btn-sm,
    .navbar-nav .btn-outline-danger,
    .navbar-nav .dropdown-toggle {
        background: transparent !important;
        border: none !important;
        color: #475569 !important;
        text-align: left !important;
        width: 100% !important;
        padding: 12px 15px !important;
        font-size: 16px !important;
        display: flex !important;
        align-items: center;
    }

    .navbar-nav .btn-primary {
        color: #1a73e8 !important;
        font-weight: 700 !important;
        background: #f1f5f9 !important;
        border-radius: 8px !important;
    }

    .navbar-nav .dropdown-menu {
        position: static !important;
        float: none;
        width: 100%;
        background-color: #ffffff !important;
        border: none !important;
        box-shadow: none !important;
        padding-left: 25px !important;
        margin: 0 !important;
    }

    .dropdown-item {
        padding: 10px 0 !important;
        font-size: 15px !important;
        color: #64748b !important;
        background: transparent !important;
    }

    .dropdown-item.active,
    .dropdown-item:active {
        color: #1a73e8 !important;
        background: transparent !important;
        font-weight: 600;
    }

    .nav-divider {
        display: none;
    }

    .main-content {
        padding: 0rem;
        margin-left: 0px;
        width: 100%;
		margin-bottom: 60px;
    }

    body.sidebar-open {
        overflow: hidden;
    }
}

@media (max-width: 767.98px) {

    .filter-sticky-tab {
        padding: 15px 10px;
    }

    .offcanvas {
        width: 100% !important;
        border-left: none;
    }

    #sidebar {

        z-index: 1041 !important;
    }

    .dt-buttons,
    .dataTables_filter {
        float: none !important;
        text-align: center !important;
        width: 100% !important;
        justify-content: center !important;
        display: flex !important;
    }

    .dataTables_wrapper .dataTables_paginate .paginate_button.numbers {
        display: none !important;
    }

    .dataTables_wrapper .dataTables_paginate {
        display: flex !important;
        justify-content: center !important;
        width: 100% !important;
        padding: 10px 0 !important;
        margin: 0 !important;
    }

    .dataTables_wrapper .dataTables_paginate .paginate_button {
        flex: 1;
        text-align: center;
        padding: 8px 4px !important;
        font-size: 11px !important;
        margin: 0 2px !important;
        white-space: nowrap;
    }


    #filterForm .btn-select-all {
        width: auto !important;
        display: flex !important;
        justify-content: flex-end !important;
        margin-left: auto;
        margin-bottom: 0px;
        padding-right: 0;
    }

    .report-item-card {
        width: 100% !important;
        min-height: 160px;
    }

    .background-icon-watermark {
        display: none;
    }

    .report-card-actions {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        margin-top: 15px;
    }

    .btn-min {
        flex: 1;
        justify-content: center;
        padding: 10px !important;
    }

    .nav.flex-column.gap-1 {
        padding-top: 15px;
    }

    #sidebar {
      
        width: 100%!important;
        left: -100%;
    }

    .nav-custom-link {
        font-size: 0.95rem;
    }

    .btn-back {
        font-size: 0.85rem;
    }

    #sidebar .text-report {
        font-size: 0.95rem;
    }

    .sub-link {
        font-size: 0.9rem !important;
    }

    .card {
        padding: 30px 15px !important;
    }

    #sidebar .text-secondary {
        font-size: 0.85rem;
    }

    #sidebar .text-muted {
        font-size: 0.8rem;
    }


    .header-container h2 {
        font-size: 1.4rem;
        margin-bottom: 10px !important;
    }

    .w-100-mobile {
        width: 100%;
        flex-direction: row !important;
        display: flex;
    }

    .w-100-mobile .btn-flex {
        flex: 1;
        padding: 0 10px;
        font-size: 0.8rem;
    }

    .view-switcher {
        display: flex;
        width: 100%;
        background: var(--m3-primary-container);
        padding: 4px;
        border-radius: 16px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        gap: 4px;
    }

    .view-switcher::-webkit-scrollbar {
        display: none;
    }

    .view-switcher .tab-style-btn {
        flex: 1;
        justify-content: center;
        border-radius: 12px;
        padding: 8px;
        font-size: 0.85rem;
        background: transparent;
        color: var(--m3-on-primary-container);
        border: none;
    }

    .main-content .d-flex.justify-content-between {
        align-items: center !important;
        text-align: center;
    }

    .btn-new-style,
    .tab-style-btn {
        width: 90% !important;
        margin: 0 auto;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    #filterForm .d-flex.justify-content-center {
        flex-direction: column !important;
        align-items: center !important;
        width: 100%;
    }

    #filterForm .btn {
        width: 100% !important;
        display: flex;
        justify-content: center;
        align-items: center;
        margin-bottom: 10px;
        padding: 12px;
    }

    .header-container h2 {
        font-size: 1.5rem;
        text-align: left;
    }

    .view-switcher {
        display: flex;
        width: 100%;
        background: #f1f5f9;
        padding: 4px;
        border-radius: 12px;
    }

    .view-switcher .tab-style-btn {
        flex: 1;
        justify-content: center;
    }

    .btn-new-main {
        width: 100%;
    }

    .navbar {
        padding: 12px 0px !important;
    }
}

@media (max-width: 600px) {
    .form-grid {
        grid-template-columns: 1fr;
    }

    .full-width {
        grid-column: span 1;
    }
}

/* Stili specifici per il Landscape Mobile (quando lo schermo si gira in orizzontale) */
@media (max-height: 576px) and (max-width: 991px) {
    
    #sidebar {
        position: fixed !important;
        bottom: 0;
        left: -100% !important; /* Forza a nascondersi al 100% a sinistra come in verticale */
        width: 50% !important;  /* Occupa tutto lo schermo anche in orizzontale */
        height: 100vh !important;
        max-height: 100vh !important;
        z-index: 1041;
        overflow: hidden;
    }

    /* QUANDO IL TASTO AGGIUNGE LA CLASSE DI APERTURA */
    /* Nota: Controlla quale di queste tre classi usa il tuo script (Bootstrap di solito usa .show) */
    #sidebar.open, #sidebar.active, #sidebar.show { 
        left: 0 !important; /* Slitta dentro lo schermo solo quando attiva */
    }

    /* GESTIONE DELLO SCROLL INTERNO (Per non far tagliare i link) */
    .sidebar-slide-container {
        flex-grow: 1;
        height: calc(100vh - 65px) !important; /* Sottrae l'altezza del tasto MENU */
        overflow: hidden;
    }

    .slide-wrapper {
        height: 100% !important;
    }

    /* Rende scrollabili i singoli pannelli interni col dito */
    .slide-panel {
        height: 100% !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch;
    }
    
    .slide-panel.d-flex {
        display: flex !important;
        flex-direction: column;
    }
    
    .panel-body {
        overflow-y: auto !important;
        flex-grow: 1;
    }
}