/* === BASE === */
body {
    margin: 0;
    font-family: 'Poppins', sans-serif;
    height: 100vh;
    background: url('../images/sfondo2.jpg') no-repeat center center fixed;
    background-size: cover;
}
body.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
}
/* Stile solo per il numero della pagina attiva con sfondo rosso */
.dataTables_wrapper .pagination .page-item.active .page-link {
    background-color: #dc3545 !important;
    border-color: #dc3545 !important;
    color: white;
}
/* Stile per gli altri elementi della paginazione con testo nero */
.dataTables_wrapper .pagination .page-item:not(.active) .page-link {
    color: black !important;
}  
.clickable-row:hover{
    cursor: pointer!important;
}
.pp_rosso{
    color: #f01a24!important;
}
.pp_bold{
    font-weight: bold;
}
/* === LOGIN PAGE === */
.login-wrapper {
    width: 100%;
    max-width: 960px;
    padding: 20px;
    z-index: 1;
}

.login-box {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.8);
}

.login-left {
    background: url('../images/sfondo.jpg') no-repeat center center;
    background-size: cover;
    background-blend-mode: multiply;
    background-color: rgba(0, 0, 0, 0.6);
    flex-direction: column;
    text-align: center;
    padding: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-left .logo {
    max-width: 150px;
    margin-bottom: 20px;
}

.login-left h1 {
    color: white;
    font-size: 2.5rem;
    font-weight: 600;
}

.login-left p {
    color: rgba(255, 255, 255, 0.75);
    margin-top: 10px;
}

.login-right {
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 30px;
}

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

.login-form h2 {
    font-weight: 600;
    color: #ef1b23;
}

.input-group-text {
    background-color: #efefef;
    color: #333;
}

.btn-danger {
    background-color: #ef1b23;
    border: none;
    font-weight: 500;
}

.btn-danger:hover {
    background-color: #c9111c;
}

/* Alert animata errore login */
.custom-alert {
    background-color: #ffdddd;
    color: #a30000;
    border-left: 6px solid #ef1b23;
    padding: 12px 16px;
    margin-bottom: 20px;
    border-radius: 8px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    animation: fadeSlideIn 0.5s ease-out;
}

.custom-alert i {
    font-size: 1.2rem;
}
.success-alert {
    background-color: #d4edda;
    color: #155724;
    border-left: 6px solid #28a745;
}
.success-alert i {
    color: #28a745;
}

@keyframes fadeSlideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    .login-left {
        display: none !important;
    }
}

/* === DASHBOARD / ADMIN === */
.admin-container {
    display: flex;
    height: 100vh;
    background: url('../images/sfondo2.jpg') no-repeat center center fixed;
    background-size: cover;
}

/* Sidebar */
.sidebar {
    width: 240px;
    min-width: 240px;
    background-color: rgba(0, 0, 0, 0.95);
    padding: 20px;
    color: white;
    display: flex;
    flex-direction: column;
    transition: width 0.3s;
    z-index: 10;
}

.sidebar.collapsed {
    width: 70px;
    min-width: 70px;
}

.sidebar-header {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 30px;
}

.sidebar .logo {
    max-width: 150px;
    transition: opacity 0.3s ease;
}

.sidebar.collapsed .logo {
    opacity: 0;
    visibility: hidden;
}

.sidebar .nav {
    list-style: none;
    padding-left: 0;
}

.sidebar .nav li {
    margin-bottom: 16px;
}

.sidebar .nav a {
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 6px;
    transition: background 0.3s;
    white-space: nowrap;
}

.sidebar .nav a:hover:not(.active) {
    background-color: #ef1b23;
}

.link-text {
    transition: opacity 0.2s ease;
}

.sidebar.collapsed .link-text {
    opacity: 0;
    width: 0;
    overflow: hidden;
}
.sidebar .nav a[href="logout.php"] {
    color: #ff4d4d;
}

.sidebar .nav a[href="logout.php"]:hover {
    background-color: #ff4d4d;
    color: white;
}
.sidebar .nav a.active {
    color: #ef1b23 !important;
    font-weight: 600;
}

.sidebar .nav a.active i {
    color: #ef1b23;
}

#toggleSidebar {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.1rem;
}
.toggle-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.4rem;
    cursor: pointer;
    transition: transform 0.2s ease;
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 99;
}

.sidebar.collapsed .toggle-btn {
    right: 15px;
}

.toggle-btn:hover {
    transform: scale(1.1);
}
/* Content dashboard */
.content {
    flex: 1;
    padding: 40px;
    color: #000;
    background-color: rgba(255, 255, 255, 0.95);
    overflow-y: auto;
}

/* Responsive menu */
@media (max-width: 768px) {
    .sidebar {
        position: absolute;
        height: 100%;
        top: 0;
        left: 0;
    }
}
