body {
    font-family: 'Segoe UI', Arial, sans-serif;
    background: linear-gradient(120deg, #232526 0%, #414345 100%);
    color: #f3f3f3;
    min-height: 100vh;
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.container {
    background: rgba(30, 30, 30, 0.92);
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.3);
    padding: 2em 2.5em 1.5em 2.5em;
    margin-top: 2em;
    max-width: 800px;
    width: 95%;
}

.error {
    background: #ff4d4f;
    color: #fff;
    padding: 0.7em 1em;
    border-radius: 8px;
    margin-bottom: 1em;
    font-weight: 600;
}

form {
    display: flex;
    flex-direction: row;
    /* align-items: flex-end; */
    gap: 1em;
    width: 100%;
}

.expert-toggle {
    display: flex;
    align-items: center; /* vertically center checkbox and label within the form's row */
    margin-top: 0.5em;
}

@media (max-width: 600px) {
    .expert-toggle {
        margin-top: 0; /* in stacked layout keep normal spacing */
    }
}

/* Expert rows: align labels and inputs into two columns so inputs stack vertically
   and are perfectly aligned regardless of label width. */
.expert-row {
    /* allow the element to not introduce its own box so its children
       participate in the parent's grid; keeps markup simple while
       allowing a single shared grid column sizing for labels */
    display: contents;
}

#expertControls {
    display: grid;
    grid-template-columns: auto 1fr; /* dynamic label column, flexible input column */
    gap: 0.5em 1em;
    align-items: center;
}

#expertControls label {
    justify-self: end; /* right-align labels to create a neat gutter */
}

#expertControls input[type="datetime-local"] {
    width: 100%;
    min-width: 0; /* allow the input to shrink inside grid */
}

/* On small screens, stack label above input for readability */
@media (max-width: 600px) {
    #expertControls {
        grid-template-columns: 1fr; /* single column: label above input */
    }
    #expertControls label {
        justify-self: start;
    }
}

label.hidden {
    display: none;
}

input[type="text"],
input[type="date"],
input[type="datetime-local"],
input[type="checkbox"],
button {
    border: none;
    border-radius: 8px;
    box-sizing: border-box;
    font-family: 'Segoe UI', Arial, sans-serif;
    font-size: 1.1em;
    font-weight: 600;
    /* min-height: 3em; */
    outline: none;
}

input[type="text"] {
    /* flex: 2 1 200px; */
    padding: 0.7em 1em;
    background: #2c2f34;
    color: #f3f3f3;
}

input[type="datetime-local"],
input[type="date"] {
    /* flex: 1 1 120px; */
    padding: 0.7em 0.5em;
    background: #2c2f34;
    color: #f3f3f3;
}

input[type="date"] {
    min-width: 120px;
    max-width: 160px;
}

input[type="datetime-local"] {
    min-width: 120px;
    max-width: 260px;
}


button {
    padding: 0.7em 1.5em;
    background: #4f8cff;
    color: #fff;
    cursor: pointer;
    transition: background 0.2s;
}
button:hover {
    background: #2563eb;
}

h2 a {
    color: #f3f3f3;
    text-decoration: none;
    font-weight: 700;
    letter-spacing: 1px;
}
p a {
    color: #4f8cff;
    text-decoration: none;
}
a:hover {
    color: #2563eb;
    text-decoration: underline;
}

.note {
    font-size: 0.9em;
    color: #aaa;
    margin-top: 1.5em;
}
.disclaimer {
    font-size: 0.9em;
    color: #777;
    margin-top: 1.5em;
}

.footer {
    text-align: center;
    font-size: 0.85em;
    color: #b0b0b0;
    margin-top: 2em;
    margin-bottom: 0.5em;
    letter-spacing: 0.5px;
}

@media (max-width: 600px) {
    .container {
        padding: 1em 0.5em;
    }
    form {
        flex-direction: column;
        gap: 0.7em;
    }
    input[type="date"],
    input[type="datetime-local"] {
        width: 100%;
        min-width: unset;
        max-width: unset;
    }
}
