/* Layout structure */
.wrapper {
    width: 100%;
    position: relative;
}

.sidebar-wrapper {
    width: 280px;
    background: var(--bs-card-bg);
    position: fixed;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 2;
    box-shadow: 0 0 15px rgb(0 0 0 / 5%);
    transition: all .2s ease-out;
}

.page-content {
    margin-left: 280px;
    padding: 0;
    min-height: 100vh;
}

.top-header {
    position: fixed;
    top: 0;
    left: 280px;
    right: 0;
    background: var(--bs-card-bg);
    border-bottom: 1px solid var(--bs-border-color);
    z-index: 1;
    padding: 0.8rem;
}

.main-content {
    padding: 85px 1.5rem 1.5rem 1.5rem;
}

.page-footer {
    position: relative;
    left: 0;
    right: 0;
    padding: 0.7rem 1.5rem;
    background: var(--bs-card-bg);
    border-top: 1px solid var(--bs-border-color);
}

/* Sidebar toggle behavior */
body.toggled .sidebar-wrapper {
    width: 70px;
    left: 0;
}

body.toggled .page-content {
    margin-left: 70px;
}

body.toggled .top-header {
    left: 70px;
}

body.toggled .sidebar-wrapper .menu-title,
body.toggled .sidebar-wrapper .logo-name {
    display: none;
}

body.toggled .sidebar-wrapper .parent-icon {
    text-align: center;
    width: 100%;
}

body.sidebar-hovered .sidebar-wrapper {
    width: 280px;
}

body.sidebar-hovered .sidebar-wrapper .metismenu a {
    justify-content: flex-start;
    padding: 10px 15px;
}

body.sidebar-hovered .sidebar-wrapper .parent-icon {
    width: 35px;
    margin-right: 10px;
    text-align: left;
}

body.sidebar-hovered .sidebar-wrapper .menu-title {
    display: block;
    text-align: left;
}

body.sidebar-hovered .sidebar-wrapper .sidebar-header {
    justify-content: flex-start;
    padding: 0 1rem;
    width: 280px;
}

body.sidebar-hovered .sidebar-wrapper .logo-name {
    display: block;
    margin-left: 10px;
}

body.sidebar-hovered .sidebar-wrapper .has-arrow::after {
    display: block;
    right: 15px;
}

.page-content,
.top-header {
    transition: all .2s ease-out;
}

/* Responsive adjustments */
@media (max-width: 1199px) {
    .sidebar-wrapper {
        left: -280px;
    }

    .page-content {
        margin-left: 0;
    }

    .top-header {
        left: 0;
    }

    body.toggled .sidebar-wrapper {
        left: 0;
    }

    body.toggled .page-content {
        margin-left: 0;
    }
}

/* Stile per le icone del menu */
.parent-icon {
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

/* Quando la sidebar è compressa */
body.toggled:not(.sidebar-hovered) .sidebar-wrapper {
    width: 70px;
}

body.toggled:not(.sidebar-hovered) .sidebar-wrapper .sidebar-header {
    width: 70px;
    justify-content: center;
    padding: 0;
}

body.toggled:not(.sidebar-hovered) .sidebar-wrapper .metismenu a {
    justify-content: center;
    padding: 10px 0;
}

body.toggled:not(.sidebar-hovered) .sidebar-wrapper .parent-icon {
    margin: 0;
}

body.toggled:not(.sidebar-hovered) .sidebar-wrapper .metismenu .menu-title,
body.toggled:not(.sidebar-hovered) .sidebar-wrapper .logo-name,
body.toggled:not(.sidebar-hovered) .sidebar-wrapper .metismenu .has-arrow::after {
    display: none;
}

/* Stile per il logo quando la sidebar è compressa */
body.toggled:not(.sidebar-hovered) .sidebar-wrapper .logo-icon {
    margin: 0;
    padding: 10px 0;
}

/* Correzione per il menu MetisMenu */
.metismenu a {
    padding: 10px 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all .2s ease-out;
}

.metismenu .has-arrow::after {
    right: 15px;
}

/* Select2 custom styles */
.select2-container--bootstrap4 {
    margin-bottom: 1rem;
}

.select2-container--bootstrap4 .select2-selection {
    height: calc(2.25rem + 2px);
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    border-radius: 0.25rem;
}

.select2-container--bootstrap4 .select2-selection--single .select2-selection__placeholder {
    color: #6c757d;
}

/* Responsive adjustments for select boxes */
@media (max-width: 768px) {
    .col-md-2 {
        margin-bottom: 1rem;
    }
}

/* Select2 card styles */
.card.border.shadow-none {
    background-color: #fff;
    margin-bottom: 1rem;
}

.card.border.shadow-none .card-header {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(0,0,0,.125);
}

.card.border.shadow-none .card-body {
    padding: 1rem;
}

/* Select2 small size adjustments */
.select2-container--bootstrap4 .select2-selection--single {
    height: calc(1.5em + 0.5rem + 2px);
    padding: 0.25rem 0.5rem;
    font-size: .875rem;
    line-height: 1.5;
    border-radius: 0.2rem;
}

.select2-container--bootstrap4 .select2-selection--single .select2-selection__rendered {
    line-height: 1.5;
}

.select2-container--bootstrap4 .select2-selection--single .select2-selection__placeholder {
    color: #6c757d;
}

.rounded-4 {
    border-radius: 0.5rem;
}

.card {
    background-color: var(--bs-card-bg);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

#monthlyChart {
    margin: 0 -10px;
}

.text-primary {
    color: #3461ff !important;
}

.text-success {
    color: #02c27a !important;
}

.text-danger {
    color: #e72e2e !important;
}

.material-icons-outlined {
    font-size: 1.2rem;
    line-height: 1;
}

.bg-grd-purple {
    background: #6f42c1;
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.social-box {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
}

.bg-light-primary {
    background-color: rgba(13, 110, 253, 0.15);
}

.bg-light-danger {
    background-color: rgba(231, 46, 46, 0.15);
}

.bg-light-info {
    background-color: rgba(13, 202, 240, 0.15);
}

.social-leads p {
    font-size: 0.875rem;
    color: #9ba7b2;
}

.social-leads h4 {
    font-weight: 600;
}

#totalFilteredUsers {
    font-weight: 500;
}

/* Assicurati che la card sia allineata a destra */
@media (min-width: 1200px) {
    .ms-auto {
        margin-left: auto !important;
    }
}

.social-box img {
    display: block;
    object-fit: contain;
}
