/**
 * Stili per le pagine di amministrazione
 * Greenpeace Italia - Gestione asset aziendali
 */

/* Importazione del font Raleway da Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Raleway:wght@300;400;500;600;700&display=swap');

:root {
    --greenpeace-green: #66cc00;
    --greenpeace-dark-green: #4d9900;
    --greenpeace-yellow: #FFE101;
    --greenpeace-dark-yellow: #E6CA01;
    --error-color: #e74c3c;
    --success-color: #2ecc71;
    --text-color: #333;
    --light-bg: #f9f9f9;
    --border-color: #ddd;
    --primary-color: #4CAF50;
    --secondary-color: #2196F3;
    --surface-color: #ffffff;
    --background-color: #f5f5f5;
    --text-primary: rgba(0, 0, 0, 0.87);
    --text-secondary: rgba(0, 0, 0, 0.6);
}

.color-green {
    color: #2e7d32 !important;    
}
.color-green-invert {
    color: #e6f7e6 !important;    
}
.color-blue {
    color: #1565c0 !important;
}
.color-blue-invert {
    color: #e3f2fd !important;
}
.color-orange {
    color: #ffd700 !important;
}
.color-orange-invert {
    color: #fff8e1 !important;
}
.color-red {
    color: #c62828 !important;
}
.color-red-invert {
    color: #ffebee !important;
}
.color-gray {
    color: #6c757d !important;
}
.color-gray-invert {
    color: #dee2e6 !important;
}


body {
    font-family: 'Raleway', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    background: #F6F4EF;
    margin: 0;
    padding: 0;
    color: var(--text-primary);
    line-height: 1.6;
    margin: 0px !important;
}

.strike {
    text-decoration: line-through;
}

.full-width {
    grid-column: 1 / -1;
}
.dynamic-attributes {
    display: none;
}
.loading {
    text-align: center;
    padding: 20px;
    color: #666;
}

/* Utility classes */
.text-center {
    text-align: center;
}

.main-content {
    background-color: white;
    padding: 2rem;
    border-radius: 0px;

    max-width: 900px;
    margin: 0 auto;

}

/* Layout principale */
.admin-container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem;
    background-color: #F6F4EF;
    border-radius: 0px;
}

.dashboard-container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 2rem;
    background-color: #F6F4EF;
    border-radius: 0px;
}

.admin-container>*:not(.admin-header):not(.search-bar):not(.alert) {
    border-radius: 0px;
    overflow: hidden;

}

.welcome-section {
    background-color: white;
    border-radius: 0px;

    padding: 2rem;
    margin-bottom: 2rem;
    text-align: center;
}

.welcome-section h1 {
    color: var(--greenpeace-green);
    margin-top: 0;
}

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

.module-card {
    background-color: white;
    border-radius: 4px;
    padding: 1.5rem;
    transition: transform 0.3s, box-shadow 0.3s;
}

.module-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.module-card h2 {
    color: #484848;
    margin-top: 0;
    font-size: 1.25rem;
    text-transform: uppercase;
}

.module-card p {
    size: 20rem;
    color: #666;
    margin-bottom: 1.5rem;
}


.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    padding-bottom: 0.2rem;
    border-bottom: 1px solid var(--border-color);
    text-transform: uppercase;
}

.admin-title {
    color: #666;
    margin: 0;
    font-size: 1.5rem !important;
}

/* Navigazione */
.nav-links {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 1rem 2rem;
    background-color: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Navbar styles */
.navbar {
    width: 100%;
    background-color: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 1000;
}

.navbar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1rem;
    max-width: 1200px;
    margin: 0 auto;
    height: 64px;
}

.navbar-logo {
    display: flex;
    align-items: center;
}

.logo-img {
    height: 40px;
    width: auto;
}

.navbar-menu {
    display: flex;
    gap: 1rem;
}



.navbar-logout {
    margin-left: auto;
}

.logout-link {
    color: var(--primary-color);
    font-size: 20px;
}

.navbar-toggle {
    display: none;
}

.hamburger-menu {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-primary);
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-menu {
    display: flex;
    flex-direction: column;
    background-color: white;
    width: 100%;
    position: absolute;
    top: 64px;
    left: 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 999;
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.3s ease-in-out;
}

.mobile-menu.show {
    max-height: 345px;
}

.mobile-nav-link {
    padding: 16px;
    text-decoration: none;
    color: var(--text-primary);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    font-weight: 500;
}

.mobile-nav-link:hover {
    background-color: rgba(0, 0, 0, 0.04);
}

.nav-link {
    padding: 12px 16px;
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    white-space: nowrap;
    min-height: 44px;
    /* Improve touch target size */
    display: flex;
    align-items: center;
    font-size: 0.9rem;
}

.nav-link:hover {
    text-decoration: none;
}

.nav-link.disabled {
    color: lightgrey;
}

/* Media queries per responsive design */
@media screen and (max-width: 768px) {

    .navbar-menu,
    .navbar-logout {
        display: none;
    }

    .navbar-toggle {
        display: block;
    }
}

@media screen and (max-width: 480px) {
    .navbar-container {
        height: 56px;
    }

    .mobile-menu {
        top: 56px;
    }

    .logo-img {
        height: 32px;
    }
}

/* Tabelle */
.users-table,
.assets-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 0rem;
    background-color: white;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    border-radius: 0px;
    font-size: 0.8rem;
}

.users-table th,
.users-table td,
.assets-table th,
.assets-table td {
    padding: 0.6rem;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.users-table th,
.assets-table th {
    background-color: var(--greenpeace-green);
    color: white;
    font-weight: 500;
}

.users-table tr:hover,
.assets-table tr:hover {
    background-color: #f5f5f5;
    transition: background-color 0.2s ease;
}

.search-input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 1rem;
    font-size: 1rem;
}

/* Status badges */
.status-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border: 2px solid;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;    
}

.status-green {
    background-color: #e6f7e6 !important;
    color: #2e7d32 !important;
    border-color: #2e7d32 !important;
}
.status-green-invert {
    background-color: #2e7d32 !important;
    color: #e6f7e6 !important;
    border-color: #e6f7e6 !important;
}
.status-blue {
    background-color: #e3f2fd !important;
    color: #1565c0 !important;
    border-color: #1565c0 !important;
}
.status-blue-invert {
    background-color: #1565c0 !important;
    color: #e3f2fd !important;
    border-color: #e3f2fd !important;
}
.status-orange {
    background-color: #fff8e1 !important;
    color: #ffd700 !important;
    border-color: #ffd700 !important;
}
.status-orange-invert {
    background-color: #ffd700 !important;
    color: #fff8e1 !important;
    border-color: #fff8e1 !important;
}
.status-red {
    background-color: #ffebee !important;
    color: #c62828 !important;
    border-color: #c62828 !important;
}
.status-red-invert {
    background-color: #c62828 !important;
    color: #ffebee !important;
    border-color: #ffebee !important;
}
.status-gray {
    background: #dee2e6 !important;
    color: #6c757d !important;
    border-color: #6c757d !important;
}
.status-gray-invert {
    background: #6c757d !important;
    color: #dee2e6 !important;
    border-color: #dee2e6 !important;
}


/* Buttons */
.btn {
    background-color: white;
    color: black;
    border: none;    
    border-radius: 4px;
    padding: 0.5rem 0.75rem;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s;
    display: flex;
    align-items: center;
    gap: 0.5rem;    
    text-decoration: none;
}
.btn:hover {
    background-color: #ddd;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}
.module-card .btn {
    background-color: var(--greenpeace-yellow);
    color: black;
    display: inline-block;
    text-decoration: none;
    text-align: center;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-weight: 500;
    transition: background-color 0.3s ease;
}
.module-card .btn.disabled,
.module-card .btn.disabled:hover {
    background-color: lightgrey;
    cursor: not-allowed;
}

.btn-green {
    background-color: var(--greenpeace-green);    
}
.btn-green:hover {
    background-color: var(--greenpeace-dark-green);    
}
.btn-yellow {
    background-color: var(--greenpeace-yellow);
}
.btn-yellow:hover {
    background-color: var(--greenpeace-dark-yellow);
}
.btn-red {
    background-color: red;
}
.btn-red:hover {
    background-color: darkred;
}
.btn-gray {
    background-color: lightgray;    
}
.btn-gray:hover {
    background-color: gray;    
}

.btn-export {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}
.btn-pdf {
    background-color: red;
}
.btn-pdf:hover {
    background-color: darkred; 
}
.btn-excel {
    background-color: #28a745;    
}
.btn-excel:hover {
    background-color: #218838;
    transform: translateY(-1px);
}
.btn-add {
    background-color: #FFE101;
    color: black;
    border: 1px solid #f0f0f0 !important;
    border-radius: 4px;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    cursor: pointer;
    transition: background-color 0.3s;
    display: flex;
    align-items: center;
    gap: 0.5rem;    
    text-decoration: none;
}
.btn-add:hover {
    background-color: var(--greenpeace-dark-yellow);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}
.btn-add::before {
    content: "+";
    margin-right: 0.5rem;
    font-size: 1.4rem;
}
.btn-group {
    display: flex;
    gap: 1rem;
}

.action-buttons {
    display: flex;
    gap: 0.5rem;
}

.btn-action {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.875rem;
    background: transparent;
    border: none;
}


/* Forms */
.form-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-row .form-group {
    flex: 1;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 0.88rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus {
    border-color: var(--greenpeace-green);
    outline: none;
    box-shadow: 0 0 0 2px rgba(102, 204, 0, 0.2);
}

.form-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #eee;
}

/* Checkbox groups */
.checkbox-group {
    margin: 1.5rem 0;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.checkbox-group input[type="checkbox"] {
    margin-right: 0.5rem;
    width: auto;
}

.help-text {
    font-size: 0.875rem;
    color: #666;
    margin-top: 0.25rem;
}

/* Stili per i messaggi di alert */
.alert {
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid transparent;
    border-radius: 4px;
    position: relative;
}

.alert-success {
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
}

.alert-warning {
    color: #856404;
    background-color: #fff3cd;
    border-color: #ffeaa7;
}

.alert-error {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

.alert i {
    margin-right: 8px;
}


/* Search */
.search-bar {
    margin-bottom: 1.5rem;
}

.search-input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
}

/* Mobile cards */
.mobile-cards {
    display: none !important;
}

@media (max-width: 768px) {
    .mobile-cards {
        display: block !important;
    }
}

.asset-card {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 1rem;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}

.asset-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

.asset-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background-color: #f9f9f9;
    border-bottom: 1px solid #eee;
}

.asset-card-title {
    font-weight: 600;
    color: var(--greenpeace-green);
}

.asset-card-content {
    padding: 1rem;
}

.asset-card-item {
    margin-bottom: 0.75rem;
    display: flex;
    justify-content: space-between;
}

.asset-card-label {
    font-weight: 500;
    color: #666;
}

.asset-card-value {
    text-align: right;
}

.asset-card-actions {
    padding: 0.75rem 1rem;
    border-top: 1px solid #eee;
    background-color: #f9f9f9;
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
}

.asset-card-info {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    line-height: 1.4;
}

.asset-card-info strong {
    color: #333;
    font-weight: 600;
}

.btn-card-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    background-color: var(--greenpeace-green);
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.875rem;
    transition: background-color 0.3s, transform 0.2s;
    min-width: 36px;
    height: 36px;
}

.btn-card-action:hover {
    background-color: var(--greenpeace-dark-green);
    transform: translateY(-1px);
    color: white;
    text-decoration: none;
}

/* Context menu */
.action-menu {
    position: relative;
    display: inline-block;
}

.action-button {
    color: black;
    border: none;
    border-radius: 4px;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    cursor: pointer;
    transition: background-color 0.3s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.action-button:hover {
    background-color: transparent
}

.context-menu {
    position: fixed;
    /* Cambiato da absolute a fixed per posizionare rispetto alla viewport */
    background-color: white;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 180px;
    z-index: 1000;
    /* Aumentato z-index per assicurarsi che sia sopra tutti gli altri elementi */
    display: none;
    overflow: hidden;
}

.context-menu.show {
    display: block;
    animation: fadeIn 0.2s ease-in-out;
}

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

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

.context-menu a {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    text-decoration: none;
    transition: background-color 0.2s;
}

.context-menu a:hover {
    background-color: #f5f5f5;
}

.context-menu-divider {
    height: 1px;
    background-color: #eee;
    margin: 0.25rem 0;
}

.context-menu-section {
    padding: 0.5rem 0;
}

.context-menu-title {
    padding: 0.5rem 1rem;
    font-weight: 600;
    font-size: 0.8rem;
    color: #666;
    background-color: #f8f9fa;
    border-bottom: 1px solid #eee;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.context-menu-section a {
    padding: 0.5rem 1rem 0.5rem 2rem;
    font-size: 0.85rem;
}

.table-responsive {
    overflow-x: auto;
    background-color: white;
    border-radius: 8px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .form-row {
        flex-direction: column;
        gap: 0;
    }

    .admin-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .users-table,
    .assets-table {
        display: block;
        overflow-x: auto;
    }

    .table-responsive {
        display: none;
    }

    .mobile-cards {
        display: block !important;
    }

    .btn-group {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
        width: 100%;
    }

    .btn-add {
        width: 100%;
        text-align: center;
    }
}

/* Stile per il menu a tendina nella navbar */
.dropdown {
    position: relative;
    display: inline-block;
}

.navbar-menu .dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-toggle {
    cursor: pointer;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #fff;
    min-width: 180px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border-radius: 0px;
    z-index: 9999;
    margin-top: 0px;
    padding: 8px 0;
    border: 1px solid #eee;
}

.navbar-menu .dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #fff;
    min-width: 180px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    z-index: 9999;
    margin-top: 5px;
    padding: 8px 0;
    border: 1px solid #eee;
}

.dropdown-item {
    display: block;
    padding: 10px 15px;
    color: #333;
    text-decoration: none;
    transition: all 0.2s;
    font-size: 14px;
}

.dropdown-item:hover {
    background-color: #f5f5f5;
    color: var(--greenpeace-green);
}

.dropdown.active .dropdown-menu,
.navbar-menu .dropdown.active .dropdown-menu {
    display: block;
}

.dropdown.active .fa-caret-down {
    transform: rotate(180deg);
}

/* Stile per il menu a tendina mobile */
.mobile-dropdown {
    width: 100%;
}

.mobile-dropdown-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    color: #333;
    cursor: pointer;
    background-color: rgba(0, 0, 0, 0.03);
    border-radius: 4px;
}

.mobile-dropdown-toggle i {
    transition: transform 0.3s;
}

.mobile-dropdown-menu {
    display: none;
    background-color: rgba(0, 0, 0, 0.05);
    padding-left: 15px;
}

.mobile-dropdown.active .mobile-dropdown-menu {
    display: block;
}

.mobile-dropdown.active .mobile-dropdown-toggle i {
    transform: rotate(180deg);
}

.dropdown i {
    margin-left: 10px;
}

/* Stili per la paginazione */

.pagination {
    display: flex;
    justify-content: left;
    margin: 20px 0;
    padding: 0;
    list-style: none;
    box-shadow: none !important;
}

.pagination li {
    margin: 0 5px;
}


.pagination a,
.pagination span {
    display: inline-block;
    padding: 8px 12px;
    border-radius: 4px;
    text-decoration: none;
    color: #333;
    background-color: #f5f5f5;
    border: 1px solid #ddd;
    transition: all 0.3s ease;
}

.pagination a:hover {
    background-color: #e9e9e9;
}

.pagination .active span {
    background-color: var(--greenpeace-green);
    color: white;
    border-color: var(--greenpeace-green);
}

.pagination .disabled span {
    color: #999;
    cursor: not-allowed;
}

.pagination-info {
    text-align: center;
    margin-bottom: 10px;
    color: #666;
    font-size: 0.9em;
}

.content-pagination-buttons {
    width: 100%;
    float: left;
    box-shadow: none !important;
}

.pagination-button-page {
    width: 50%;
    float: left;
}

.pagination-button-nextprev {
    width: 50%;
    float: right;
    text-align: right;
    padding-top: 10px;
}

/* Stili per la sezione filtri */
.filter-section {
    background-color: white;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.filter-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: flex-end;
}

.filter-group {
    flex: 1;
    min-width: 200px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.filter-group label {
    display: block;
    margin-bottom: 0.6rem;
    font-weight: 500;
    color: #444;
    font-size: 0.95rem;
}

.filter-group input,
.filter-group select {
    width: 100%;
    padding: 0.57rem 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px !important;
    color: #999;
    transition: all 0.3s ease;
    box-sizing: border-box;    
}

.filter-group input:focus {
    border-color: var(--greenpeace-green);
    outline: none;
    box-shadow: 0 0 0 3px rgba(102, 204, 0, 0.2);
    background-color: white;
}

.filter-group input:hover:not(:focus) {
    border-color: #aaa;
    background-color: #f5f5f5;
}

/* Stili per select e textarea */
.filter-group select,
.filter-group textarea {
    width: 100%;
    padding: 0.85rem 1rem;
    border: 1px solid #ddd;
    border-radius: 0px;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.filter-group select:focus,
.filter-group textarea:focus {
    border-color: var(--greenpeace-green);
    outline: none;
    box-shadow: 0 0 0 3px rgba(102, 204, 0, 0.2);
    background-color: white;
}

.filter-group select:hover:not(:focus),
.filter-group textarea:hover:not(:focus) {
    border-color: #aaa;
    background-color: #f5f5f5;
}

.filter-group textarea {
    min-height: 120px;
    resize: vertical;
}

/* Stile per il placeholder */
.filter-group input::placeholder,
.filter-group textarea::placeholder {
    color: #aaa;    
    font-size: 0.9rem;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.filter-group input:focus::placeholder,
.filter-group textarea:focus::placeholder {
    opacity: 0.5;
}


.filter-buttons {
    display: flex;
    gap: 10px;
}

.btn-filter,
.btn-reset {
    padding: 8px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background-color: #f0f0f0;
    color: #333;    
}

.btn-filter:hover,
.btn-reset:hover {
    background-color: #e0e0e0;
}

/* Responsive per i filtri */
@media (max-width: 768px) {
    .filter-group {
        min-width: 100%;
    }
}

.btn-filter-toggle {
    background: white;
    border: 1px solid #e4e4e4;
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    border-radius: 4px;
    float: left;
    margin-right: 10px;
    height: 40px;
}

.page-title-content {
    float: left;
    width: 100%;
}


/* Stili per i menu contestuali */
.context-menu {
    position: absolute;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    /* Valore alto per assicurarsi che sia sopra tutto */
    min-width: 150px;
    display: none;
}

.context-menu.active {
    display: block;
}

/* Importante: questo assicura che il menu non sia tagliato */
.table-responsive {
    overflow: visible !important;
    /* Sovrascrive l'overflow per permettere ai menu di essere visibili */
}

/* In alternativa, se non vuoi modificare l'overflow della tabella */
.action-menu {
    position: relative;
}

/* Posizionamento del menu contestuale */
.action-menu .context-menu {
    right: 0;
    top: 100%;
}

/* Stili per le voci del menu */
.context-menu a {
    display: block;
    padding: 8px 12px;
    color: #333;
    text-decoration: none;
    white-space: nowrap;
}

.context-menu a:hover {
    background-color: #f5f5f5;
}

.context-menu-divider {
    height: 1px;
    background-color: #ddd;
    margin: 4px 0;
}

.action-button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px 10px;
    color: #333;
}

.context-menu {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    z-index: 10;
    min-width: 150px;
}

.context-menu.active {
    display: block;
}

.context-menu a {
    display: block;
    padding: 8px 12px;
    color: #333;
    text-decoration: none;
    white-space: nowrap;
}

.context-menu a:hover {
    background-color: #f5f5f5;
}

.context-menu-divider {
    height: 1px;
    background-color: #ddd;
    margin: 4px 0;
}

/* Stile per il menu contestuale dei documenti */
.context-menu {
    position: absolute;
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    padding: 8px 0;
    min-width: 200px;
    z-index: 1000;
}

.context-menu-title {
    padding: 8px 16px;
    font-weight: bold;
    color: #333;
    border-bottom: 1px solid #eee;
}

.context-menu-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.context-menu-item {
    padding: 0;
}

.context-menu-item a {
    display: block;
    padding: 8px 16px;
    color: #333;
    text-decoration: none;
    transition: background-color 0.2s;
}

.context-menu-item a:hover {
    background-color: #f5f5f5;
}

.context-menu-item-info {
    display: block;
    font-size: 0.8em;
    color: #666;
    margin-top: 2px;
}

.context-menu-loading,
.context-menu-error,
.context-menu-empty {
    padding: 8px 16px;
    color: #666;
}

.context-menu-error {
    color: #d9534f;
}


.movimento-assegnazione {
    background-color: rgba(144, 238, 144, 0.1);
}

.movimento-restituzione {
    background-color: rgba(255, 182, 193, 0.1);
}

/* Personalizzazione di Select2 per farlo assomigliare alle select native */
.select2-container--default .select2-selection--single {
    height: 45px;
    padding: 8px 12px;
    border-radius: 0px;
    border: 1px solid #ccc;
    font-size: 15px;
    font-family: inherit;
    appearance: auto;
    -webkit-appearance: auto;
    -moz-appearance: auto;
    padding: 12px;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    color: #333;
    line-height: normal;
    padding-left: 0;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 100%;
    top: 0;
    right: 8px;
}

/* Stile per il dropdown quando è aperto */
.select2-dropdown {
    border: 1px solid #ccc;
    border-radius: 4px;
}

.select2-search__field {
    padding: 6px !important;
    border: 1px solid #ccc !important;
}

.select2-results__option {
    padding: 8px 12px;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: var(--greenpeace-dark-green);
}

.select2-container--default .select2-selection--single .select2-selection__clear {
    cursor: pointer;
    float: right;
    font-weight: bold;
    height: 21px;
    margin-right: 21px;
    padding-right: 0px;
}


/* Select2 Greenpeace Colors */
.select2-container {
    width: 100% !important;
}

.select2-selection--single {
    height: 38px !important;
    border: 1px solid #ddd !important;
    border-radius: 4px !important;
    padding: 6px 12px !important;
    font-size: 14px !important;
}

.select2-selection__rendered {
    line-height: 26px !important;
    color: #333 !important;
}

.select2-selection__arrow {
    height: 38px !important;
}

.select2-dropdown {
    border: 1px solid #ddd !important;
    border-radius: 4px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
}

.select2-search__field {
    border: 1px solid #ddd !important;
    border-radius: 4px !important;
    padding: 8px !important;
    font-size: 14px !important;
}

.select2-search__field:focus {
    border-color: var(--greenpeace-dark-green) !important;
    outline: none !important;
    box-shadow: 0 0 0 2px rgba(102, 204, 0, 0.2) !important;
}

.select2-results__option {
    padding: 8px 12px !important;
    font-size: 14px !important;
}

.select2-results__option--highlighted {
    background-color: var(--greenpeace-dark-green) !important;
    color: white !important;
}

.select2-results__option--selected {
    background-color: var(--greenpeace-green) !important;
    color: white !important;
}

.form-group.focused .select2-selection--single {
    border-color: var(--greenpeace-green) !important;
    box-shadow: 0 0 0 2px rgba(102, 204, 0, 0.2) !important;
}

.select2-container--open .select2-selection--single {
    border-color: var(--greenpeace-green) !important;
    box-shadow: 0 0 0 2px rgba(102, 204, 0, 0.2) !important;
}

.select2-results__message {
    padding: 8px 12px !important;
    font-size: 14px !important;
    color: #666 !important;
    font-style: italic !important;
}


/* Stili per la vista compatta */
.group-header {
    background-color: #f8f9fa;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.group-header:hover {
    background-color: #e9ecef;
}

.group-header td {
    border-bottom: 2px solid #dee2e6 !important;
}

.group-detail {
    background-color: #fdfdfd;
}

.group-detail td {
    border-bottom: 1px solid #f1f3f4 !important;
}

.expand-icon {
    transition: transform 0.2s ease;
    margin-right: 8px;
    color: #6c757d;
}

.expand-icon.fa-chevron-down {
    transform: rotate(90deg);
}

/* Stili per le card mobile vista compatta */
.mobile-group-card {
    background-color: white;
    border-radius: 8px;
    margin-bottom: 1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.mobile-group-header {
    background-color: #f8f9fa;
    padding: 1rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #dee2e6;
    transition: background-color 0.2s ease;
}

.mobile-group-header:hover {
    background-color: #e9ecef;
}

.mobile-group-title {
    font-weight: 600;
    color: #495057;
    display: flex;
    align-items: center;
}

.mobile-group-title .expand-icon {
    margin-right: 8px;
    color: #6c757d;
}

.mobile-group-count {
    background-color: #6c757d;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

.mobile-group-details {
    padding: 0;
}

.mobile-card-detail {
    border-bottom: 1px solid #f1f3f4;
    padding: 1rem;
}

.mobile-card-detail:last-child {
    border-bottom: none;
}

.mobile-card-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.mobile-card-detail-title {
    font-weight: 500;
    color: #495057;
    font-size: 0.9rem;
}

.mobile-card-detail-body {
    margin-bottom: 1rem;
}

.mobile-card-detail-footer {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.mobile-card-detail-footer .mobile-card-action {
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem;
}

/* Stili per le azioni vista compatta */
.mobile-group-actions {
    padding: 1rem;
    background-color: #f8f9fa;
    border-top: 1px solid #dee2e6;
}

.mobile-action-section {
    margin-bottom: 1rem;
}

.mobile-action-section:last-child {
    margin-bottom: 0;
}

.mobile-action-title {
    font-weight: 600;
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mobile-action-section .mobile-card-action {
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.75rem;
    padding: 0.3rem 0.6rem;
    display: inline-block;
}


/* Accordion Styles */
.accordion-section {
    background: white;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border: 1px solid #e0e0e0;
    overflow: hidden;
}

.accordion-header {
    background: #f8f9fa;
    padding: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #e0e0e0;
    transition: background-color 0.3s ease;
    user-select: none;
}

.accordion-header:hover {
    background: #e9ecef;
}

.accordion-header.active {
    border-bottom: 3px solid #66cc00;
}

.accordion-header.active .accordion-title i {}

.accordion-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0;
}

.accordion-title i {
    color: #66cc00;
    transition: color 0.3s ease;
}

.accordion-toggle {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
    color: #666;
}

.accordion-header.active .accordion-toggle {
    transform: rotate(180deg);

}

.accordion-content {
    padding: 0 20px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease;
}

.accordion-content.active {
    padding: 20px;
    max-height: 10000px;
    /* Valore alto per contenere tutto il contenuto */
}

/* Stili per pulsanti */
.accordion-btn-edit {
    background-color: white !important;
    border: 2px solid lightgray !important;
    color: #FFE101 !important;
    border-radius: 12px !important;
    width: 32px !important;
    height: 32px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    transition: all 0.3s ease !important;
}
.accordion-btn-edit:hover {
    background-color: lightgray !important;            
    transform: scale(1.1) !important;
}
.accordion-btn-edit i {
    color: #FFE101 !important;
    font-size: 14px !important;
}
.accordion-btn-delete {
    background-color: white !important;
    border: 2px solid lightgray !important;
    color: red !important;
    border-radius: 12px !important;
    width: 32px !important;
    height: 32px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    transition: all 0.3s ease !important;
}
.accordion-btn-delete:hover {
    background-color: lightgray !important;            
    transform: scale(1.1) !important;
}
.accordion-btn-delete i {
    color: red !important;
    font-size: 14px !important;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.info-item {
    display: flex;
    flex-direction: column;
}

.info-label {
    font-weight: 600;
    color: #555;
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.info-value {
    color: #333;
    font-size: 1rem;
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 4px;
    border: 1px solid #e9ecef;
}

.info-value.enfasi {    
    font-size: 1.4rem;
    padding: 18px 12px;    
    border: 4px solid;
    border-radius: 8px;    
}

.info-value.warning {
    color: red;
}

.info-blank {
    color: #333;
    font-size: 1rem;
    padding: 8px 12px;
    background: #ffff00;
    border-radius: 4px;
    border: 1px solid #e9ecef;
}

.timeline {
    position: relative;
    padding-left: 30px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #dee2e6;
}

.timeline-item {
    position: relative;
    margin-bottom: 30px;
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border: 1px solid #e0e0e0;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -37px;
    top: 20px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 3px solid white;
    background: var(--item-color, #e6f7e6);
    box-shadow: 0 0 0 2px var(--item-color, #e6f7e6);
}

.timeline-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.timeline-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
    background: var(--item-color, #66cc00);
}

.timeline-title {
    font-weight: 600;
    color: #333;
    font-size: 1.1rem;
}

.timeline-info {
    color: #6c757d;
    font-size: 0.9rem;
    margin-left: auto;
}

.timeline-content {
    color: #333;
    font-size: 1rem;
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 4px;
    border: 1px solid #e9ecef;
}

.timeline-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e9ecef;
}

.timeline-meta-item {
    display: flex;
    flex-direction: column;
}

.timeline-meta-label {
    font-weight: 500;
    color: #6c757d;
    font-size: 0.8rem;
    margin-bottom: 2px;
}

.timeline-meta-value {
    color: #333;
    font-size: 0.9rem;
}

.timeline-documents {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e9ecef;
}

.document-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 8px;
}

.document-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: #f8f9fa;
    color: #495057;
    text-decoration: none;
    border-radius: 4px;
    border: 1px solid #dee2e6;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.document-link:hover {
    background: #e9ecef;
    color: #495057;
    text-decoration: none;
    border-color: #adb5bd;
}

.document-link i {
    color: #66cc00;
}