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

header {
    background-color: #333;
    color: white;
    text-align: center;
    padding: 1rem;
}

main {
    max-width: 600px; /* Reduced width to minimize whitespace */
    margin: 0 auto;
    padding: 20px;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* Form Styling */
form {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
}

.form-group {
    flex: 1 1 calc(33.33% - 10px);
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: bold;
    margin-bottom: 5px;
}

.form-group input,
.form-group select {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1rem;
}

button {
    background-color: #333;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
}

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

footer {
    text-align: center;
    background-color: #333;
    color: white;
    padding: 1rem;
    margin-top: 20px;
}

/* Results Table */
#results {
    margin-top: 20px;
}

#results table {
    width: 100%;
    border-collapse: collapse;
}

#results th, #results td {
    border: 1px solid #ccc;
    padding: 10px;
    text-align: left;
}

#results th {
    background-color: #f4f4f4;
    font-weight: bold;
}

/* Search Form Controls */
#toggle-search {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    color: #333;
    margin-bottom: 10px;
    padding: 5px;
}

#toggle-search::before {
    content: "";
}

#search-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
}

#search-form {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
}

#search-form .form-group {
    flex: 1 1 calc(33.33% - 10px);
    display: flex;
    flex-direction: column;
}

#search-form.hidden {
    visibility: hidden;
    opacity: 0;
    height: 0;
    margin-bottom: 0;
}

/* Registration Form Styling */
.registration-form {
    max-width: 500px;
    margin: 0 auto;
    padding: 20px;
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.registration-form fieldset {
    margin-bottom: 20px;
    border: none;
    padding: 0;
}

.registration-form legend {
    font-size: 1.2em;
    font-weight: bold;
    margin-bottom: 10px;
}

.registration-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.registration-form input,
.registration-form select {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1em;
}

/* Flex container for name fields */
.name-fields {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.name-fields .field-group {
    flex: 1;
}

.name-fields .field-group input {
    width: 90%; /* Ensures inputs take up available width within their field group */
}

.name-fields .field-group:last-child input {
    margin-right: 0; /* Removes margin from the last field to avoid extra space */
}

/* Fieldset for email and password */
.registration-form label[for="email"] {
    margin-top: 15px;
}

/* Phone Number Styling */
.registration-form input[type="tel"] {
    margin-top: 10px;
}

/* Styling for the date input */
.registration-form input[type="date"] {
    width: 90%; /* Adjust to match the other input fields */
    margin-bottom: 15px;
}

/* Submit Button */
.registration-form .btn-submit {
    width: 100%;
    padding: 10px;
    font-size: 1.1em;
    color: #fff;
    background-color: #007bff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.registration-form .btn-submit:hover {
    background-color: #0056b3;
}

/* Style for the required asterisk */
.required {
    color: red;
    font-weight: bold;
}

/* Flex container for password fields */
.password-fields {
    display: flex;
    gap: 15px; /* Adjust the gap as needed */
    margin-bottom: 15px;
}

.password-fields .field-group {
    flex: 1;
}

.password-fields .field-group input {
    width: 90%; /* Optional: Adjust input width for better alignment */
}

/* Optional: Adjust margin if you want more space around the fields */
.password-fields .field-group:first-child input {
    margin-right: 15px;
}