:root {
    --primary-color: #6a5acd;
    --secondary-color: #ff69b4;
    --accent-color: #00bfff;
    --text-color: #2d3748;
    --bg-color: #f8f9fa;
    --card-bg: rgba(255, 255, 255, 0.95);
    --danger-color: #F44336;
    --warning-color: #FFC107;
    
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    overflow-x: hidden;
    padding-top: 56px; /* Spazio per navbar fixed */
}

.navbar {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1030;
}

.sidebar {
    background-color: aliceblue;
    box-shadow: 5px 0 15px rgba(0, 0, 0, 0.05);
    position: fixed;
    top: 56px;
    left: 0;
    bottom: 0;
    width: 250px;
    z-index: 1020;
    overflow-y: auto;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.sidebar.collapsed {
    width: 60px;
}

.sidebar.collapsed .nav-link span {
    display: none;
}

.sidebar.collapsed .nav-link {
    text-align: center;
    padding: 10px 5px;
}

.sidebar.collapsed .nav-link i {
    margin-right: 0;
}

.sidebar .nav-link {
    color: var(--text-color);
    border-radius: 8px;
    margin: 5px 10px;
    transition: all 0.3s ease;
    white-space: nowrap;
    padding: 10px 15px;
}

.sidebar .nav-link:hover {
    background: rgba(106, 90, 205, 0.1);
    transform: translateX(5px);
}

.sidebar .nav-link.active {
    background: linear-gradient(90deg, rgba(106, 90, 205, 0.2), transparent);
    border-left: 4px solid var(--primary-color);
    color: var(--primary-color);
}

.sidebar .nav-link i {
    color: var(--primary-color);
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

.page-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 25px;
    text-align: center;
    position: relative;
    transition: all 0.3s ease;
}

.page-title {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 5px;
    position: relative;
    display: inline-block;
}

/* .page-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: var(--accent-color);
    border-radius: 3px;
} */

.filter-card {
    background: rgba(106, 90, 205, 0.05);
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0;
    border-left: 4px solid var(--primary-color);
}

.form-control, .form-select {
    border-radius: 8px;
    padding: 10px 15px;
    border: 1px solid rgba(106, 90, 205, 0.3);
    transition: all 0.3s ease;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(106, 90, 205, 0.2);
}

.btn {
    border-radius: 50px;
    padding: 10px 20px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: #5a4ab5;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(106, 90, 205, 0.3);
}

.btn-danger {
    background: var(--danger-color);
    color: white;
}

.btn-danger:hover {
    background: #d32f2f;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(244, 67, 54, 0.3);
}

.total-debt-card {
    background: rgba(244, 67, 54, 0.1);
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0;
    border-left: 4px solid var(--danger-color);
    text-align: center;
}

.total-debt {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--danger-color);
}

.debtor-card {
    background: white;
    border-radius: 10px;
    margin: 20px 0;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    border-left: 4px solid var(--warning-color);
}

.debtor-header {
    background: rgba(255, 193, 7, 0.1);
    padding: 15px 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.debtor-body {
    padding: 0;
}

.appointment-item {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.appointment-item:last-child {
    border-bottom: none;
}

.appointment-details {
    flex: 1;
    min-width: 200px;
    margin-bottom: 10px;
}

.appointment-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.badge {
    padding: 6px 12px;
    border-radius: 50px;
    font-weight: 500;
    font-size: 0.8rem;
}

.badge-danger {
    background-color: var(--danger-color);
}

/* Stili per il contenuto principale */
.content {
    margin-left: 250px;
    padding: 20px;
    transition: all 0.3s ease;
    width: -moz-available;
    width: -webkit-fill-available;
}

.content.collapsed {
    margin-left: 60px;
}

/* Overlay per mobile */
.sidebar-overlay {
    position: fixed;
    top: 56px;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0,0,0,0.5);
    z-index: 1019;
    display: none;
}
.table th {
    background-color: var(--primary-color);
    color: white;
    text-align: left;
}

/* Media queries per dispositivi mobili */
@media (max-width: 992px) {
    .sidebar {
        transform: translateX(-100%);
        width: 250px;
        z-index: 1040;
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    
    .sidebar-overlay.show {
        display: block;
    }
    
    .content {
        margin-left: 0;
    }
    
    .filter-card .row > div {
        margin-bottom: 15px;
    }
    
    .appointment-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .appointment-actions {
        width: 100%;
        justify-content: flex-end;
    }
}

@media (max-width: 768px) {
    .table th, .table td {
        padding: 0.5rem;
        font-size: 0.9rem;
    }
    
    .total-income {
        font-size: 1.4rem;
    }

    .page-title {
        font-size: 1.5rem;
    }
    
    .total-debt {
        font-size: 1.4rem;
    }
    
    .debtor-header h4 {
        font-size: 1.2rem;
    }
    
    .appointment-details {
        min-width: 100%;
    }
    
    .appointment-actions {
        justify-content: space-between;
    }
    
    .appointment-actions .btn {
        flex: 1;
        text-align: center;
    }
}

@media (max-width: 576px) {
    .filter-card .row > div {
        margin-bottom: 15px;
    }
    
    .filter-card .col-md-2 {
        width: 100%;
    }

    .content {
        padding: 15px;
    }
    
    .filter-card {
        padding: 15px;
    }
    
    .debtor-header h4 {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .debtor-header .badge {
        margin-top: 10px;
        float: none !important;
    }
    
    .appointment-actions .btn {
        padding: 8px 12px;
        font-size: 0.9rem;
    }
    
    .page-header {
        padding: 15px;
    }
}
/* Stili aggiuntivi specifici per questa pagina */
.total-income-card {
    background: rgba(106, 90, 205, 0.1);
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0;
    border-left: 4px solid var(--primary-color);
    text-align: center;
}

.total-income {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--primary-color);
}

.table-responsive {
    overflow-x: auto;
    margin: 20px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}
