body { 
    font-family: Arial; 
    max-width: 1200px; 
    margin: 0 auto; 
    padding: 20px; 
}

table { 
    width: 100%; 
    border-collapse: collapse; 
    margin: 20px 0; 
}

th, td { 
    padding: 8px; 
    border: 1px solid #ddd; 
}

th { 
    text-align: center; 
    background: #f5f5f5; 
}

td { 
    text-align: right; 
}

td:first-child { 
    text-align: center; 
}

.total td { 
    font-weight: bold; 
    background: #f9f9f9; 
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.1);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

.modal-content {
    background-color: #fefefe;
    margin: 15px auto;
    padding: 0 20px 20px 20px;
    border: 1px solid #888;
    width: 80%;
    max-height: 70vh;
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;
}

.modal-content table thead tr th {
    position: sticky;
    top: 0;
    background: #f5f5f5;
    z-index: 1;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.close { 
    float: right; 
    cursor: pointer; 
    font-weight: bold;
    font-size: 28px; /* Even larger */
    padding: 5px 10px;
    line-height: 1;
    color: #555; /* Darker gray color */
    transition: color 0.2s;
}

.close:hover {
    color: #000; /* Black on hover */
}


/* Links and Clickable Elements */
td a { 
    color: inherit; 
    text-decoration: none; 
}

.clickable {
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    padding: 5px;
    display: inline-block;
    border-bottom: 2px solid #007bff;
    color: #007bff;
    text-decoration: none;
}

.clickable:hover {
    transform: translateY(-3px);
    box-shadow: 4px 4px 10px rgba(0,0,0,0.3);
    background-color: #f0f0f0;
}

.clickable:active {
    transform: translateY(0);
    box-shadow: 1px 1px 3px rgba(0,0,0,0.2);
}

/* Warning Messages */
#jsWarning { 
    background: #fff3cd; 
    padding: 10px; 
    margin: 10px 0; 
}

#MessageDiv { 
    background: white; 
    padding: 5px; 
    margin: 5x 0; 
}

#qryResultsMsgDiv { 
    background: white; 
}

#qryResultsMsgDiv *:not(:empty) {
  background-color: yellow;
  padding: 1px;
  display: block; /* Or block, if you want full width */
  box-shadow: 0 0 3px 2px rgba(255, 255, 0, 0.7);
  transition: box-shadow 0.3s ease-in-out;
}

/* Utility Classes */
.total {
    font-weight: bold;
}

.text-left { 
    text-align: left; 
}

.text-center { 
    text-align: center; 
}

.text-right {
    text-align: right; 
}

.legend {
    margin-top: 5px;
    font-size: 0.9em;
}
.legend li {
    margin-bottom: 8px;
}
.note {
    font-size: 0.7em;
    color: #666;
}
.error-message {
    background-color: #fff3cd;
    color: #856404;
    padding: 10px;
    margin: 10px 0;
    border: 1px solid #ffeeba;
    border-radius: 4px;
}

#main-table {
    table-layout: auto;
	width: auto;
    border-collapse: collapse;
    margin: 20px 0;
}

#main-table th, td {
    /*width: min-content;*/
    white-space: normal;     /* Allow text wrapping */
	max-width: 150px;
	min-width: 50px;
}
#modal-table {
    table-layout: auto;
	width: auto;
    border-collapse: collapse;
    margin: 20px 0;
}

#modal-table th {
    white-space: normal;     /* Allow text wrapping */
}
.hilite {
  background-color: yellow;
  font-size: small; 
  color: red;
  font-weight: bold;
}