body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background-color: #f4f7f6; /* Light grey background */
    color: #333; /* Dark text */
}

header {
    background-color: #0056b3; /* Government-like blue */
    color: #fff;
    padding: 1rem 0;
    text-align: center;
    margin-bottom: 20px;
}

main {
    max-width: 900px;
    margin: 20px auto;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

fieldset {
    border: 1px solid #ccc;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 5px;
    background-color: #ffffff;
}

legend {
    font-weight: bold;
    font-size: 1.2em;
    color: #0056b3;
    padding: 0 10px;
}

.form-group {
    margin-bottom: 15px;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #555;
}

input[type="text"],
input[type="number"],
select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box; /* Include padding in width */
    font-size: 1em;
    color: #333; /* Ensure input text is dark */
    font-weight: bold; /* Make input data bold */
}

select {
    cursor: pointer;
}

button {
    background-color: #28a745; /* Green for add/load */
    color: white;
    padding: 12px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1em;
    transition: background-color 0.3s ease;
}

button:hover {
    background-color: #218838;
}

#loadDataButton {
     background-color: #007bff; /* Blue for load */
     margin-top: 10px;
}
#loadDataButton:hover {
     background-color: #0056b3;
}


#datacoll {
    margin-top: 20px;
    padding: 15px;
    border: 1px dashed #aaa;
    background-color: #e9ecef; /* Slightly different background */
    border-radius: 5px;
}

#datacoll h2 {
    margin-top: 0;
    color: #0056b3;
}

#existingDataContent p,
#existingDataContent table { /* Style the loaded data */
    font-weight: bold;
    color: #333;
}
/* Basic table styling if you load data as a table */
#existingDataContent table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}
#existingDataContent th, #existingDataContent td {
    border: 1px solid #ccc;
    padding: 8px;
    text-align: left;
}
#existingDataContent th {
    background-color: #ddeeff;
}


input:required:invalid,
select:required:invalid {
    border-color: #dc3545; /* Red border for invalid HTML5 required fields */
}

.error-message {
    color: #dc3545; /* Red */
    font-size: 0.9em;
    display: block; /* Show errors below the field */
    height: 1em; /* Reserve space even when empty */
    margin-top: 3px;
}

.status-message {
    margin-top: 15px;
    padding: 10px;
    border-radius: 4px;
    font-weight: bold;
}
.status-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}
.status-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}


footer {
    text-align: center;
    margin-top: 30px;
    padding: 10px;
    font-size: 0.9em;
    color: #777;
}

/* Initially hide sections that depend on selections */
#datacoll,
#newEntrySection,
#dataFields {
    display: none;
}