
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Hanuman', serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #ffffff 100%);
    padding: 20px;
    min-height: 100vh;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

/* ===== Stepper ===== */
.stepper {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 20px;
}

.stepper .step-item {
    text-decoration: none;
}

.step-item {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    border-radius: 30px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    cursor: pointer;
    transition: box-shadow 0.2s ease, transform 0.15s ease, background 0.2s ease, color 0.2s ease;
    color: #2f5233;
}

.step-item:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.step-number {
    width: 34px;
    height: 34px;
    background: #198754;
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.step-texts {
    display: flex;
    flex-direction: column;
}

.step-label-main {
    font-weight: 700;
    font-size: 1rem;
}

.step-label-sub {
    font-size: 0.85rem;
    color: #6b7280;
}

/* active & completed */
.step-item.active {
    background: #008000;
    color: #ffffff;
}

.step-item.active .step-number {
    background: #ffffff;
    color: #008000;
}

.step-item.completed {
    background: #ffffff;
    color: #080707;
}

.step-item.completed .step-number {
    background: #ffffff;
    color: #2f5233;
}

@media (max-width: 768px) {
    .step-label-sub {
        display: none;
    }
    .stepper {
        flex-direction: column;
    }
}

/* ===== Sections (cards) ===== */
.section {
    margin-bottom: 20px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    background: white;
}

.section-header {
    background: #008000;
    color: white;
    padding: 13px 24px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 18px;
    font-weight: 700;
    transition: background 0.3s ease;
}

.section-header:hover {
    background: #006600;
}

.section-header::after {
    content: '▼';
    font-size: 14px;
    transition: transform 0.3s ease;
}

.section-header.collapsed::after {
    transform: rotate(-90deg);
}

.section-content {
    background: white;
    max-height: 2000px;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease;
}

.section-content.collapsed {
    max-height: 0;
    padding: 0;
}

.form-container {
    padding: 30px;
}

/* ===== applicant type row (radios left, checkbox right) ===== */
.applicant-type-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.radio-group {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.radio-pill {
    position: relative;
}

.radio-pill input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.radio-pill label {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 400;
    background: white;
    position: relative;
}

.radio-pill label::before {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid #bbb;
    border-radius: 50%;
    background: white;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.radio-pill input[type="radio"]:checked + label {
    background: white;
    border-color: #008000;
    color: #008000;
    font-weight: 700;
}

.radio-pill input[type="radio"]:checked + label::before {
    border-color: #008000;
    background: white;
    box-shadow: inset 0 0 0 5px #008000;
}

.radio-pill label:hover {
    border-color: #008000;
}

/* checkbox pill on the right */
.self-applicant-wrapper {
    display: flex;
    align-items: center;
}

.checkbox-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 8px;
    border: 1.5px solid #e0e0e0;
    background: #fafafa;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.checkbox-pill input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #008000;
}

.checkbox-pill:hover {
    border-color: #008000;
    background: #f0fff4;
}

.form-grid {
    display: grid;
    grid-template-columns: 10fr 2fr;
    gap: 15px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-row {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.form-row-3 {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.form-group label {
    margin-bottom: 8px;
    font-weight: 400;
    color: #333;
    font-size: 15px;
}

.form-group label .required {
    color: red;
    margin-left: 3px;
}

.form-group input[type="text"],
.form-group input[type="date"],
.form-group select {
    padding: 12px 16px;
    border: 1.5px solid #e0e0e0;
    border-radius: 8px;
    font-family: 'Hanuman', serif;
    font-size: 15px;
    transition: all 0.3s ease;
    background: white;
}

.form-group input[type="text"]:focus,
.form-group input[type="date"]:focus,
.form-group select:focus {
    outline: none;
    border-color: #008000;
    box-shadow: 0 0 0 3px rgba(0, 128, 0, 0.1);
}

.form-group input[type="file"] {
    display: none;
}

.file-upload-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.file-upload-preview {
    width: 120px;
    height: 140px;
    border: 2px dashed #e0e0e0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #f9f9f9;
    cursor: pointer;
    transition: all 0.3s ease;
}

.file-upload-preview:hover {
    border-color: #008000;
    background: #f0f8f0;
}

.file-upload-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.file-upload-preview svg {
    width: 70px;
    height: 70px;
    color: #ccc;
}

.file-upload-btn {
    background: #008000;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-family: 'Hanuman', serif;
    font-size: 13px;
    transition: background 0.3s ease;
}

.file-upload-btn:hover {
    background: #006600;
}

.hidden {
    display: none;
}

/* Transfer upload row */
.transfer-upload-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.transfer-label-text {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    color: #333;
}

.transfer-label-text .required {
    color: red;
    margin-left: 3px;
}

.transfer-label-text a {
    color: #008000;
    text-decoration: underline;
    font-size: 14px;
}

.transfer-file-input {
    display: none;
}

.transfer-upload-btn {
    background: #008000;
    color: white;
    border: none;
    padding: 8px 18px;
    border-radius: 6px;
    cursor: pointer;
    font-family: 'Hanuman', serif;
    font-size: 14px;
    transition: background 0.3s ease;
    white-space: nowrap;
}

.transfer-upload-btn:hover {
    background: #006600;
}

/* Step navigation buttons (bottom) */
.step-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 25px;
}

.step-right-group {
    display: flex;
    gap: 10px;
}

.btn {
    padding: 8px 18px;
    border-radius: 999px;
    border: none;
    font-family: 'Hanuman', serif;
    font-size: 14px;
    cursor: pointer;
}

.btn-secondary {
    background: #e0e0e0;
    color: #333;
}

.btn-primary {
    background: #008000;
    color: #fff;
    border: none;
    padding: 5px 18px;
    border-radius: 18px;
    font-size: 15px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.btn-primary:hover {
    background: #006600;
}

.btn-outline-green {
    background: #ffffff;
    color: #008000;
    border: 1.8px solid #008000;
    padding: 5px 18px;
    border-radius: 18px;
    font-size: 15px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.btn-outline-green:hover {
    background: #f3fff3;
    color: #006600;
    border-color: #006600;
}

.btn-icon svg,
.btn-icon-right svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
}

/* Responsive */
@media (max-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr;
    }

    .section-header {
        font-size: 16px;
        padding: 15px 20px;
    }

    .form-container {
        padding: 20px;
    }

    .applicant-type-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .self-applicant-wrapper {
        align-self: flex-start;
    }
}

/* Select arrow */
select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 35px;
}

/* Representative form spacing */
#repIndividualForm,
#repCompanyForm {
    padding-top: 16px;
    margin-top: 10px;
}

.btn-tertiary {
    background: #ffffff;
    color: #333;
    border: 1.5px solid #dcdcdc;
}

.btn-tertiary:hover {
    background: #f5f5f5;
    border-color: #c6c6c6;
}

/* Page header */
.page-header-soft {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #dcffe6;
    padding: 12px 16px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    margin-bottom: 20px;
    font-weight: 700;
    font-size: 1.2rem;
}

.page-title {
    color: #044c29;
}

.page-home {
    display: flex;
    align-items: center;
}

.home-link {
    display: flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    font-size: 0.95rem;
    color: #0b57d0;
    font-weight: 600;
}

.home-link:hover {
    text-decoration: underline;
}

.home-icon {
    width: 20px;
    height: 20px;
}

/* Step 2 specific helpers */
.checkbox-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px 20px;
    margin-bottom: 15px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #333;
}

.checkbox-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #008000;
}

#otherPurposeText {
    margin-top: 8px;
    display: none;
}

/* Fertilizer table */
.table-wrapper {
    overflow-x: auto;
}

.table-wrapper table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    font-size: 14px;
}

.table-wrapper th,
.table-wrapper td {
    border: 1px solid #e5e7eb;
    padding: 8px 10px;
    text-align: left;
}

.table-wrapper th {
    background: #f3f4f6;
    font-weight: 700;
}

.table-wrapper td input[type="text"] {
    width: 100%;
    box-sizing: border-box;
}

.table-actions {
    margin-top: 10px;
}

/* ==== Checkbox grid in Section 1 ==== */
.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.checkbox-purpose{
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border-radius: 10px;
    background: #ffffff;
    /* border: 2px solid #e5e7eb;*/
    cursor: pointer;
    font-size: 15px;
    transition: all 0.25s ease;
    /*box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);*/
}

.checkbox-purpose:hover {
    background: #f0fdf4;
    box-shadow: 0 2px 6px rgba(0, 128, 0, 0.1);
    transform: translateY(-1px);
}

.checkbox-purpose:has(input[type="radio"]:checked),
.checkbox-purpose:has(input[type="checkbox"]:checked) {
    background: #f0fdf4;
    font-weight: 600;
    color: #065f46;
}

.checkbox-purpose::before {
    content: '';
    width: 15px;
    height: 15px;
    border: 2.5px solid #d1d5db;
    background: #ffffff;
    flex-shrink: 0;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.checkbox-purpose input[type="radio"],
.checkbox-purpose input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}
.checkbox-purpose:has(input[type="radio"]:checked),
.checkbox-purpose:has(input[type="checkbox"]:checked) {
    background: #f0fdf4;
    font-weight: 600;
    color: #065f46;
}

/* NEW — tick style */
.checkbox-purpose:has(input:checked)::before {
    background: #16a34a;
    border-color: #16a34a;
    color: white;
    content: "✔";
    font-size: 12px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
}




.checkbox-pill-row {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border-radius: 10px;
    background: #ffffff;
   /* border: 2px solid #e5e7eb;*/
    cursor: pointer;
    font-size: 15px;
    transition: all 0.25s ease;
    /*box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);*/
}

.checkbox-pill-row:hover {
    background: #f0fdf4;
    box-shadow: 0 2px 6px rgba(0, 128, 0, 0.1);
    transform: translateY(-1px);
}

.checkbox-pill-row input[type="radio"],
.checkbox-pill-row input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.checkbox-pill-row::before {
    content: '';
    width: 15px;
    height: 15px;
    border: 2.5px solid #d1d5db;
    border-radius: 50%;
    background: #ffffff;
    flex-shrink: 0;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.checkbox-pill-row:has(input[type="radio"]:checked)::before,
.checkbox-pill-row:has(input[type="checkbox"]:checked)::before {
    background: #ffffff;
    border-color: #16a34a;
    box-shadow: inset 0 0 0 5px #16a34a, 0 0 0 3px rgba(22, 163, 74, 0.1);
}

.checkbox-pill-row:has(input[type="radio"]:checked),
.checkbox-pill-row:has(input[type="checkbox"]:checked) {
    background: #f0fdf4;
    font-weight: 600;
    color: #065f46;
}

/* Keep label normal even when the input is disabled */
.purpose-check[disabled],
.purpose-check.disabled {
    pointer-events: none;
    opacity: 1 !important;
}

/* Make the checkbox element itself look normal when disabled */
.purpose-check input[disabled] {
    pointer-events: none;
    opacity: 1 !important;
    filter: none !important;
}