/* ─── Rental Deposit Manager - App Styles ─────────────────────────────── */

/* Sidebar */
.sidebar {
    width: 250px;
    height: 100vh;
    transition: transform 0.3s ease-in-out, left 0.3s ease-in-out;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.sidebar-header {
    flex: 0 0 auto;
}

.sidebar-nav {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
}

.sidebar-nav::-webkit-scrollbar {
    width: 8px;
}

.sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.25);
    border-radius: 8px;
}

.sidebar.collapsed {
    transform: translateX(-100%);
}

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

.sidebar-overlay.show {
    display: block;
}

.sidebar .nav-link {
    padding: 0.6rem 1rem;
    border-radius: 0.5rem;
    margin-bottom: 2px;
    font-size: 0.9rem;
}

.sidebar .nav-link:hover {
    background: rgba(255,255,255,0.1);
}

.sidebar .nav-link.active {
    background: rgba(13, 110, 253, 0.3);
}

/* Page Content */
.page-content {
    margin-left: 250px;
    transition: all 0.3s;
    min-height: 100vh;
}

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

/* Cards */
.card {
    border-radius: 0.75rem;
}

.card-header {
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

/* Tables */
.table th {
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6c757d;
}

.table td {
    vertical-align: middle;
    font-size: 0.9rem;
}

/* Badge sizes */
.badge-sm {
    font-size: 0.7rem;
    padding: 0.2em 0.5em;
}

/* Responsive */
@media (max-width: 991.98px) {
    .sidebar {
        left: -250px !important;
        transform: none !important;
        margin-left: 0 !important;
    }
    .sidebar.show {
        left: 0 !important;
        transform: none !important;
    }
    .page-content {
        margin-left: 0 !important;
        width: 100%;
    }
}

/* Stat Cards Animation */
.card:hover {
    transform: translateY(-2px);
    transition: transform 0.2s;
}

/* Form Styles */
.form-control:focus, .form-select:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.15rem rgba(13, 110, 253, 0.15);
}

/* Print */
@media print {
    .sidebar, .navbar, .btn { display: none !important; }
    .page-content { margin-left: 0 !important; }
}
.comuni-dropdown {
    position: absolute;
    z-index: 1050;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, .15);
    max-height: 250px;
    overflow-y: auto;
    display: none;
    min-width: 100%;
}

.comuni-dropdown .comune-item {
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    border-bottom: 1px solid #f1f1f1;
    font-size: 0.9rem;
}

.comuni-dropdown .comune-item:hover {
    background-color: #f8f9fa;
}
