body {
    margin: 0;
    background: #f4f4f4;
    font-family: Arial, sans-serif;
}

header {
    background: #1f4aa0;
    color: white;
    padding: 15px;
    text-align: center;
}

main {
    padding: 15px;
}

.card {
    background: white;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px #0002;
}

label {
    display: block;
    margin-top: 10px;
    font-weight: bold;
}

input, select, textarea, button {
    width: 100%;
    padding: 8px;
    margin-top: 5px;
    border-radius: 6px;
    border: 1px solid #ccc;
    box-sizing: border-box;
}

button {
    background: #1f4aa0;
    color: white;
    cursor: pointer;
    margin-top: 15px;
}

button:hover {
    background: #153a7a;
}

.hidden { display: none; }

.error { color: red; margin-top: 10px; }
.status { color: green; margin-top: 10px; }

.viewOnly {
    border-left: 5px solid orange;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

table th, table td {
    padding: 8px;
    border-bottom: 1px solid #ccc;
    text-align: left;
}

table th {
    background: #e5e5e5;
}

.tableWrapper {
    max-width: 100%;
    overflow-x: auto;    /* horizontal scroll */
    overflow-y: auto;    /* vertical scroll */
    max-height: 400px;   /* chart will scroll vertically after 400px */
    border: 1px solid #ccc;
    border-radius: 6px;
}

/* Optional: improve mobile scrolling */
.tableWrapper::-webkit-scrollbar {
    height: 8px;
    width: 8px;
}

.logTable {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px; /* forces horizontal scroll on small screens */
}

.logTable th,
.logTable td {
    padding: 8px;
    border-bottom: 1px solid #ddd;
    white-space: nowrap; /* keeps cells from wrapping */
}

/* Makes the wrapper scrollable */
.tableWrapper {
    max-width: 100%;
    overflow-x: auto;
    overflow-y: auto;
    max-height: 400px;
    border: 1px solid #ccc;
    border-radius: 6px;
}

/* Basic table formatting */
.logTable {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

/* Freeze header */
.logTable thead th {
    position: sticky;
    top: 0;
    background: #f5f5f5;   /* Light gray background */
    z-index: 10;           /* Keeps it above table body */
    border-bottom: 2px solid #ccc;
}

/* Table cell formatting */
.logTable th,
.logTable td {
    padding: 8px;
    border-bottom: 1px solid #ddd;
    white-space: nowrap;
}

/* Alternating row shading */
.logTable tbody tr:nth-child(odd) {
    background-color: #fafafa;
}

.logTable tbody tr:nth-child(even) {
    background-color: #ffffff;
}

/* Darker hover effect */
.logTable tbody tr:hover {
    background-color: #eef7ff;
}

/* Scrollable wrapper */
.tableWrapper {
    overflow-x: auto;
    overflow-y: auto;
    max-height: 450px; /* vertical scroll appears if too tall */
    border: 1px solid #ddd;
    border-radius: 6px;
}

/* Table styling */
.logTable {
    width: 100%;
    min-width: 800px;  /* Forces horizontal scroll on small screens */
    border-collapse: collapse;
}

/* Freeze header */
.logTable thead th {
    position: sticky;
    top: 0;
    background: #f3f3f3;
    z-index: 10;
    padding: 10px;
    border-bottom: 2px solid #ccc;
}

/* Cells */
.logTable td,
.logTable th {
    padding: 10px;
    border-bottom: 1px solid #ddd;
    white-space: nowrap; /* prevents columns from squishing */
}

/* Alternating row colors */
.logTable tbody tr:nth-child(odd) {
    background-color: #fafafa;
}
.logTable tbody tr:nth-child(even) {
    background-color: #ffffff;
}

/* Hover highlight */
.logTable tbody tr:hover {
    background-color: #eef7ff;
}
