/* Base styles */
.container {
    max-width: 750px;
    width: 100%;
    background: var(--text-color-light);
    padding: 2rem 2.5rem;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease-in-out;
    box-sizing: border-box;
    margin-left: auto;
    margin-right: auto
}

h1 {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 2rem;
    font-size: 2.25rem;
    font-weight: 700;
    text-shadow: 1px 1px 1px #c3f1d3;
}

/* Labels */
label {
    font-weight: 600;
    display: block;
    margin-top: 1.5rem;
    color: var(--primary-color);
    user-select: none;
}

/* Inputs, Selects, Textareas */
input[type="text"],
input[type="number"],
input[type="date"],
textarea,
select {
    width: 100%;
    padding: 0.75rem 1rem;
    margin-top: 0.3rem;
    border: 1.5px solid #ccc;
    border-radius: 8px;
    font-size: 1.05rem;
    transition: border 0.3s ease, box-shadow 0.3s ease;
    box-sizing: border-box;
    font-weight: 400;
    color: var(--text-color);
    background-color: #fafafa;
    outline-offset: 2px;
}

input:focus,
textarea:focus,
select:focus {
    border-color: var(--bg-color);
    outline: none;
    box-shadow: 0 0 8px rgba(10, 141, 60, 0.5);
}

textarea {
    min-height: 120px;
    resize: vertical;
    font-family: inherit;
}

/* Radio and Checkbox groups */
.radio-group,
.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem 2rem;
    margin-top: 0.75rem;
}

.checkbox-group label,
.radio-group label {
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    color: var(--bg-color);
    user-select: none;
    font-size: 1rem;
}

/* Fieldsets */
fieldset {
    margin-top: 1.8rem;
    border: 1.5px solid #ccc;
    padding: 1.5rem 2rem;
    border-radius: 12px;
    background-color: #f6fff9;
    box-sizing: border-box;
}

fieldset legend {
    font-weight: 700;
    color: var(--primary-color);
    padding: 0 0.5rem;
    font-size: 1.1rem;
}

/* Button */
button {
    margin-top: 2.5rem;
    padding: 0.95rem 0;
    width: 100%;
    background: var(--primary-color);
    border: none;
    border-radius: 10px;
    color: var(--bg-color);
    font-size: 1.25rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.35s ease-in-out, box-shadow 0.3s ease;
    box-shadow: 0 5px 15px rgba(10, 141, 60, 0.5);
}

button:hover,
button:focus {
    background: #087e35;
    box-shadow: 0 6px 20px rgba(8, 126, 53, 0.7);
    outline: none;
}

/* Status message */
#status {
    display: none;
    /* keep other styles */
    text-align: center;
    margin-top: 1.8rem;
    font-weight: 700;
    color: var(--text-color-light);
    background: rgba(0, 0, 0, 0.35);
    padding: 1rem 1.2rem;
    border-radius: 8px;
    user-select: none;
    min-height: 2.4rem;
    box-sizing: border-box;
}


/* Toggle inputs (allowance inputs) */
.toggle-input {
    display: none;
    margin-top: 0.5rem;
    margin-bottom: 1.2rem;
    font-weight: 400;
    font-size: 1rem;
}

input[type="checkbox"]:checked+.toggle-input,
input[type="checkbox"]:checked~.toggle-input {
    display: block;
}

/* Responsive styles */
@media (max-width: 900px) {
    .container {
        max-width: 95vw;
        padding: 1.8rem 2rem;
    }

    button {
        font-size: 1.1rem;
    }
}

@media (max-width: 600px) {
    body {
        padding: 1rem 0.5rem;
    }

    .container {
        padding: 1.5rem 1.5rem;
        border-radius: 12px;
    }

    h1 {
        font-size: 1.8rem;
        margin-bottom: 1.5rem;
    }

    label {
        font-size: 1rem;
        margin-top: 1rem;
    }

    input[type="text"],
    input[type="number"],
    input[type="date"],
    textarea,
    select {
        font-size: 1rem;
        padding: 0.65rem 0.9rem;
    }

    .radio-group,
    .checkbox-group {
        gap: 0.7rem 1rem;
    }

    button {
        padding: 0.85rem 0;
        font-size: 1.05rem;
    }
}

@media (max-width: 400px) {

    label,
    .checkbox-group label,
    .radio-group label {
        font-size: 0.95rem;
    }
}