﻿:root {
    --table-base: var(--color-pumpkin);
    --table-light: rgba(245, 133, 41, 0.05); /* sfondo righe alternate */
    --table-lighter: rgba(245, 133, 41, 0.1); /* hover leggero */
    --table-hover-bg: rgba(245, 133, 41, 0.15);
    --table-hover-text: var(--color-brown);
    --table-header-bg: rgba(245, 133, 41, 0.08);
    --table-header-text: var(--color-brown);
}

/* Tabelle base */
.table {
    font-size: 0.9rem;
    border-collapse: collapse;
    color: var(--grigio-scuro);
    background-color: var(--bianco);
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

    .table th,
    .table td {
        padding: 0.75rem 1rem;
        vertical-align: middle;
        border-bottom: 1px solid #e5e7eb;
    }

    /* Header */
    .table thead th {
        background-color: var(--table-header-bg);
        color: var(--table-header-text);
        font-weight: 600;
        border-bottom: 2px solid var(--table-base);
        font-size: 0.85rem;
        text-transform: uppercase;
        letter-spacing: 0.03em;
    }

    /* Righe alternate */
    .table.table-striped tbody tr:nth-child(even) {
        background-color: var(--table-light) !important;
    }

    /* Hover */
    .table.table-hover tbody tr:hover {
        background-color: var(--table-hover-bg) !important;
        color: var(--table-hover-text);
    }

    /* Bottoni azioni */
    .table td .btn {
        margin-right: 0.3rem;
        padding: 0;
        font-size: 1rem;
        vertical-align: middle;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border-radius: 0.4rem;
        transition: all 0.2s ease-in-out;
    }

        .table td .btn i {
            margin-right: 0.25rem;
        }

/* Responsive */
.table-responsive {
    overflow-x: auto;
}

/* Extra padding */
.table th:first-child,
.table td:first-child {
    padding-left: 1.25rem;
}

.table th:last-child,
.table td:last-child {
    padding-right: 1.25rem;
}

/* Celle numeriche e date */
table.dataTable th.dt-type-numeric,
table.dataTable th.dt-type-date,
table.dataTable td.dt-type-numeric,
table.dataTable td.dt-type-date {
    text-align: left;
}


div.dt-container.dt-empty-footer tbody > tr:last-child > * {
    padding: 8px 20px;
}

table.dataTable > tbody > tr > th,
table.dataTable > tbody > tr > td {
    padding: 8px 20px;    
}

.note-cell {
    max-height: 80px; /* altezza massima visibile */
    overflow-y: auto; /* scroll verticale */
    overflow-x: hidden; /* evita lo scroll orizzontale */
    white-space: pre-wrap; /* mantiene gli a capo */
}