/* =========================================
   1. VARIABLES & RESET
   ========================================= */
:root {
    --primary: #10b981;       /* Agri Green */
    --primary-light: #ecfdf5; /* Light Green Bg */
    --midnight: #0f172a;      /* Deep Navy (Buttons) */
    --bg-body: #f8fafc;       /* Light Slate */
    --surface: #ffffff;       /* Pure White */
    --text-main: #0f172a;     /* Dark Black */
    --text-muted: #64748b;    /* Gray */
    --border: #e2e8f0;        /* Borders */
    --radius: 16px;
}

body {
    background-color: var(--bg-body);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: var(--text-main);
    margin: 0;
}

/* --- MAIN CONTAINER --- */
.form-container {
    max-width: 900px;
    margin: 50px auto;
    padding: 0 20px;
}

/* --- HEADER --- */
.form-header {
    text-align: center;
    margin-bottom: 40px;
}

.form-header h2 {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-main);
    margin: 0 0 10px 0;
    letter-spacing: -0.03em;
}

.form-header p {
    color: var(--text-muted);
    font-size: 1.05rem;
    margin: 0;
}

/* =========================================
   2. SECTION CARDS & STEPS
   ========================================= */
.form-section-card {
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border);
    padding: 35px;
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
}

/* The Step Header (Circle + Title) */
.section-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
    border-bottom: 1px dashed var(--border);
    padding-bottom: 20px;
}

.step-number {
    width: 36px;
    height: 36px;
    background-color: var(--primary-light);
    color: var(--primary); /* Green Text */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1rem;
    border: 1px solid #d1fae5;
}

.section-header h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-main);
}

/* =========================================
   3. INPUTS & GRID
   ========================================= */
.input-grid {
    display: grid;
    grid-template-columns: 1fr 1fr; /* 2 Columns Default */
    gap: 25px;
}

/* Special Grids */
.input-grid.three-col { grid-template-columns: 1fr 1fr 1fr; }
.input-grid.two-col { grid-template-columns: 1fr 1fr; }

/* Full Width span */
.input-group.full-width {
    grid-column: 1 / -1;
}

.input-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

/* Modern Input Style (Matches Harvests) */
.form-input {
    width: 100%;
    padding: 12px 16px;
    font-size: 1rem;
    background-color: #f8fafc; /* Subtle Gray */
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-main);
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.form-input:focus {
    outline: none;
    background-color: #ffffff;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.15); /* Green Glow */
}

/* =========================================
   4. BUTTONS (MIDNIGHT & GHOST)
   ========================================= */
.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    margin-top: 40px;
    align-items: center;
}

/* Primary: Midnight Blue */
.btn-submit {
    background-color: var(--midnight);
    color: white;
    padding: 14px 32px;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 6px -1px rgba(15, 23, 42, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-submit:hover {
    background-color: #1e293b;
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(15, 23, 42, 0.3);
}

/* Secondary: Ghost White */
.btn-cancel {
    background-color: white;
    color: var(--text-muted);
    border: 1px solid var(--border);
    padding: 12px 24px;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-cancel:hover {
    background-color: #f8fafc;
    color: var(--text-main);
    border-color: #cbd5e1;
    transform: translateY(-2px);
}

/* =========================================
   5. ERRORS & MOBILE
   ========================================= */
.error-banner {
    background: #fef2f2;
    border: 1px solid #fee2e2;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 30px;
    display: flex;
    gap: 15px;
    color: #991b1b;
}
.error-icon { font-size: 1.5rem; }
.error-content h4 { margin: 0 0 5px 0; font-size: 1rem; }
.error-content ul { margin: 0; padding-left: 20px; }

@media (max-width: 768px) {
    .input-grid, .input-grid.three-col, .input-grid.two-col {
        grid-template-columns: 1fr; /* Stack everything on mobile */
        gap: 20px;
    }
    .form-actions {
        flex-direction: column-reverse;
        width: 100%;
    }
    .btn-submit, .btn-cancel {
        width: 100%;
        justify-content: center;
    }
}