/* ==========================================================================
   General Body and Font Styles
   ========================================================================== */

body {
    font-family: 'Inter', sans-serif; /* Upgraded to Inter */
    background-color: #f3f4f6; /* Modern subtle gray background */
    margin: 0;
    color: #1f2937; /* Dark slate for better readability */
}

/* ==========================================================================
   Main Layout
   ========================================================================== */

.container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.sidebar {
    width: 250px;
    background-color: #1e293b; /* Sleek dark slate */
    color: white;
}

.content {
    flex-grow: 1;
    padding: 2rem;
}

/* ==========================================================================
   Form General & Sections
   ========================================================================== */

#crop-config-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    max-width: 1400px; /* Constrain max width for ultra-wide screens */
    margin: 0 auto;
}

.form-section {
    background-color: #ffffff;
    border-radius: 12px; /* Smoother corners */
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06); /* Modern elevation */
    overflow: hidden;
    border: 1px solid #e5e7eb; /* Subtle border definition */
}

.form-section-header {
    background-color: #f9fafb; /* Light, clean header */
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.form-section-heading {
    margin: 0;
    color: #111827;
    font-size: 1.15rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem; /* Space for icons */
}

.form-section-body,
.form-section-body-crop-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    padding: 1.5rem;
}

.form-section-body-column-layout {
    padding: 1.5rem;
}

.form-sub-section-body-crop-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    flex-grow: 1;
}

.form-section-body-crop-details {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 2rem;
}

/* ==========================================================================
   Form Fields and Inputs
   ========================================================================== */

.form-fields {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

label {
    font-weight: 500;
    color: #4b5563;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
}

input[type="date"],
input[type="number"],
input[type="text"],
select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    background-color: #ffffff;
    color: #1f2937;
    transition: all 0.2s ease-in-out;
    box-sizing: border-box;
}

input[type="date"]:focus,
input[type="number"]:focus,
input[type="text"]:focus,
select:focus {
    outline: none;
    border-color: #3b82f6; /* Modern focus ring color */
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15); /* Soft glow focus */
}

input:disabled, 
select:disabled {
    background-color: #f3f4f6;
    cursor: not-allowed;
    color: #9ca3af;
}

/* ==========================================================================
   Radio Buttons
   ========================================================================== */

.form-radio-buttons {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    padding-top: 0.5rem;
}

.form-radio-buttons input[type="radio"] {
    margin-right: 0.4rem;
    accent-color: #2563eb; /* Modern primary blue */
    width: 1.1rem;
    height: 1.1rem;
    cursor: pointer;
}

.form-radio-buttons label {
    font-weight: 500;
    cursor: pointer;
    font-size: 0.95rem;
}

/* ==========================================================================
   Information Display Grids
   ========================================================================== */

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    background-color: transparent;
    width: 100%;
}

.crop-info-field {
    background-color: #f9fafb;
    padding: 1.25rem;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.crop-info-field label {
    font-weight: 600;
    color: #6b7280;
    display: block;
    margin-bottom: 5px;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.crop-info-field p {
    margin: 0;
    font-size: 1.1rem;
    color: #111827;
    font-weight: 500;
}

/* ==========================================================================
   Submit Button
   ========================================================================== */

.submit-btn-container {
    display: flex;
    justify-content: center;
    padding: 1rem 0;
}

.submit-btn {
    background-color: #059669; /* Professional Emerald Green */
    color: white;
    border: none;
    padding: 0.875rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: 0 4px 6px -1px rgba(16, 185, 129, 0.2);
    width: 250px;
}

.submit-btn:hover {
    background-color: #047857; /* Darker green on hover */
    box-shadow: 0 6px 8px -1px rgba(16, 185, 129, 0.3);
    transform: translateY(-1px);
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media (max-width: 992px) {
    .content {
        padding: 1.5rem;
    }

    .form-section-body-crop-details {
        flex-direction: column;
        align-items: stretch;
    }

    .submit-btn {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        height: auto;
    }

    .form-section-body,
    .form-sub-section-body-crop-details,
    .info-grid {
        grid-template-columns: 1fr; /* Stack fields on smaller screens */
    }
}