.export-wrapper {
    font-family: Arial, sans-serif;
    padding: 20px;
}

/* TABLE */
#diviseTable {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    font-size: 14px;
    position: relative;
    z-index: 1;
}

#diviseTable th {
    background: #f3f3f3;
    position: sticky;
    top: 0;
    z-index: 2;
}

#diviseTable th,
#diviseTable td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: left;
}

#diviseTable tr:nth-child(even) {
    background: #fafafa;
}

.missing {
    background: #ffe5e5;
    color: #b30000;
}

/* SWITCH */
.export-switch {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.mode-btn {
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid #ddd;
    background: #f5f5f5;
    cursor: pointer;
}

.mode-btn.active {
    background: orange;
    color: #fff;
    font-weight: bold;
}

/* EXPORT BUTTON */
.export-btn {
    background: #2271b1;
    color: white;
    font-weight: bold;
    padding: 8px 14px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
}

/* MODAL */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 999999;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: white;
    width: 800px;
    max-height: 80vh;
    overflow-y: auto;
    padding: 20px;
    border-radius: 12px;
}

/* GRID */
.columns-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

/* MODAL GROUPS */
.modal-group-title {
    font-weight: bold;
    margin: 15px 0 8px;
    text-transform: uppercase;
}

.modal-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 8px 12px;
    margin-bottom: 8px;
}

.modal-item {
    font-size: 13px;
    display: flex;
    gap: 6px;
    align-items: center;
    padding: 4px 0;
}

.modal-group-title {
    width: 100%;
    grid-column: 1 / -1;
    background: #f3f3f3;
    padding: 6px 10px;
    border-radius: 6px;
}

@media (max-width: 900px) {
    .modal-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 500px) {
    .modal-grid {
        grid-template-columns: 2fr;
    }
}

@media (max-width: 768px) {

    .export-wrapper {
        overflow-x: auto;
    }

    #diviseTable {
        min-width: 900px; /* forza lo scroll orizzontale */
    }
}



/* ACTIONS */
.modal-actions {
    margin-top: 15px;
    display: flex;
    gap: 10px;
}

.btn-confirm {
    background: #2271b1;
    color: white;
    padding: 8px 12px;
    border-radius: 8px;
    border: none;
}

.btn-cancel {
    background: #ddd;
    padding: 8px 12px;
    border-radius: 8px;
    border: none;
}