:root {
    /* Color Variables */
    --titolobackground: rgba(0, 0, 0, 0.993);
    --titolotext: rgba(196, 193, 193, 0.993);
    --bkgrosso: rgba(255, 0, 0, 0.75);
    --bkgblu: rgba(0, 127, 255, 0.75);
    --bkggrigio: rgba(196, 193, 193, 0.993);
    --bkgverde: rgba(98, 133, 57);
    --txtrosso: rgba(255, 0, 0, 1);
    --txtblu: rgb(0, 127, 255);
    --txtverde: rgba(123, 198, 70);
    --txtbianco: rgba(255, 255, 255);
    --txtlink: rgba(83, 135, 237, 1);
    --colpari: rgba(0, 0, 0, 1);
    --coldispari: rgba(45, 44, 44, 1);
    --bordoblu: rgba(0, 127, 255, 0.4);
}

/* General body and table container styling */
html, body {
    background-color: #f8f8f8; /* Light background (default) */
    margin: 0;
    padding: 0;
    height: 100%;
    overflow: hidden;
}

#table-container {
    width: 100%;
    height: calc(100vh - 60px);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    z-index: 1; /* Lower than the right menu */
}

/* Common Table Styles (applies to both light and dark modes) */
table {
    border-collapse: collapse;
    width: 100%;
    font-family: Arial, sans-serif;
}

th, td {
    border: 1px solid black;
    border-bottom: 1px solid var(--bordoblu);
    padding: 8px;
    text-align: center;
}

th {
    position: sticky;
    top: 0;
    z-index: 2;
    padding: 8px;
    text-align: center;
    border: 1px solid black;
}

/* Fixed column styles */
.fixed-column {
    position: sticky;
    left: 0;
    z-index: 1;
    box-shadow: 2px 0 5px rgba(255, 255, 255, 0.1);
}

#header-titolo {
    left: 0;
    z-index: 3;
    background-color: black;
}

#sortableTable td.fixed-column, #sortableTable td.fixed-column a {
    color: var(--txtlink) !important;
    font-weight: bold;
}

/* Light Mode Styles */
table {
    background-color: white; /* Light background for the table */
    color: black; /* Text color for light mode */
}

/* Light mode: specific styling for the header "titolo" */
#header-titolo {
    background-color: #e0e0e0; /* Light grey background for light mode */
    color: black; /* Use your grey text color */
}


tr:nth-child(odd) {
    background-color: #ffffff; /* White background for odd rows */
    color: #333; /* Darker text for contrast */
}

tr:nth-child(even) {
    background-color: #f1f1f1; /* Light grey background for even rows */
    color: #333; /* Darker text for contrast */
}

th {
    background-color: #e0e0e0; /* Light grey for table header in light mode */
    color: #333; /* Dark text for table header */
    border-color: #cccccc; /* Light grey border for light mode */
}

tr:hover {
    background-color: #ddd; /* Hover effect with slightly darker grey in light mode */
}

/* Dark Mode Styles */
.dark-mode table {
    background-color: #333; /* Dark background for the table */
    color: white; /* Light text color for dark mode */
}

.dark-mode #header-titolo {
    background-color: black; /* Dark background for the title header in dark mode */
    color: var(--txtbianco); /* White text color in dark mode */
}

.dark-mode tr:nth-child(odd) {
    background-color: var(--coldispari); /* Darker shade for odd rows in dark mode */
    color: var(--txtbianco); /* Light text */
}

.dark-mode tr:nth-child(even) {
    background-color: var(--colpari); /* Lighter shade for even rows in dark mode */
    color: var(--txtbianco); /* Light text */
}

.dark-mode th {
    background-color: black; /* Dark header background */
    color: var(--txtbianco); /* Light text color for table header */
    border-color: rgba(255, 255, 255, 0.2); /* Lighter border color for dark mode */
}

.dark-mode tr:hover {
    background-color: #323131; /* Darker hover effect for dark mode */
}

.fixed-column {
    text-align: center;
}

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-left {
    text-align: left;
}

.font-size-lg {
    font-size: 1.2em;
}

.font-size-xl {
    font-size: 1.5em;
}

.color-red {
    color: var(--txtrosso);
}

.color-blue {
    color: var(--txtblu);
}

.bg-blue {
    background-color: var(--bkgblu);
}

.hidden {
    display: none;
}

.w-80 {
    width: 80px;
}

.w-200 {
    width: 200px;
}

.w-300 {
    width: 300px;
}

.w-70 {
    width: 70px;
}

