<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Credit Insurance Form</title>
    <style>
        :root {
            --primary: #1e40af;
            --primary-hover: #1e3a8a;
            --error: #ef4444;
            --success: #22c55e;
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
        }

        body {
            background-color: #f9fafb;
            color: #1f2937;
            line-height: 1.5;
        }

        .header {
            background-color: var(--primary);
            color: white;
            padding: 1rem;
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
        }

        .header-content {
            max-width: 1200px;
            margin: 0 auto;
            display: flex;
            align-items: center;
            gap: 0.75rem;
        }

        .container {
            max-width: 800px;
            margin: 2rem auto;
            padding: 0 1rem;
        }

        .form-section {
            background: white;
            border-radius: 0.5rem;
            padding: 1.5rem;
            margin-bottom: 1.5rem;
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
            border: 1px solid #e5e7eb;
            animation: fadeIn 0.3s ease-out;
        }

        @keyframes fadeIn {
            from {
                opacity: 0;
                transform: translateY(10px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        .section-title {
            font-size: 1.25rem;
            font-weight: 600;
            color: #111827;
            margin-bottom: 1rem;
            padding-bottom: 0.5rem;
            border-bottom: 1px solid #e5e7eb;
        }

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

        .form-group {
            margin-bottom: 1rem;
        }

        .form-label {
            display: block;
            font-size: 0.875rem;
            font-weight: 500;
            color: #374151;
            margin-bottom: 0.5rem;
        }

        .required::after {
            content: '*';
            color: var(--error);
            margin-left: 0.25rem;
        }

        .form-control {
            width: 100%;
            padding: 0.5rem 0.75rem;
            border: 1px solid #d1d5db;
            border-radius: 0.375rem;
            font-size: 0.875rem;
            transition: all 0.2s;
        }

        .form-control:focus {
            outline: none;
            border-color: var(--primary);
            box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
        }

        .form-control.error {
            border-color: var(--error);
        }

        .error-message {
            color: var(--error);
            font-size: 0.75rem;
            margin-top: 0.25rem;
        }

        .button-group {
            display: flex;
            justify-content: flex-end;
            gap: 1rem;
            margin-top: 2rem;
        }

        .btn {
            padding: 0.5rem 1rem;
            border-radius: 0.375rem;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.2s;
        }

        .btn-primary {
            background-color: var(--primary);
            color: white;
            border: none;
        }

        .btn-primary:hover {
            background-color: var(--primary-hover);
        }

        .btn-secondary {
            background-color: white;
            border: 1px solid #d1d5db;
            color: #374151;
        }

        .btn-secondary:hover {
            background-color: #f3f4f6;
        }

        .success-message {
            background-color: #f0fdf4;
            border: 1px solid #86efac;
            color: #166534;
            padding: 1rem;
            border-radius: 0.5rem;
            margin-bottom: 1rem;
            display: none;
        }

        @media (max-width: 640px) {
            .form-grid {
                grid-template-columns: 1fr;
            }

            .button-group {
                flex-direction: column;
            }

            .btn {
                width: 100%;
            }
        }
    </style>
</head>
<body>
    <header class="header">
        <div class="header-content">
            <h1>Credit Management System</h1>
        </div>
    </header>

    <div class="container">
        <div id="successMessage" class="success-message">
            Form submitted successfully!
        </div>

        <form id="creditForm" onsubmit="handleSubmit(event)">
            <div class="form-section">
                <h2 class="section-title">Core Information</h2>
                <div class="form-grid">
                    <div class="form-group">
                        <label class="form-label required" for="pid">PID</label>
                        <input type="text" id="pid" name="pid" class="form-control" maxlength="20" required>
                    </div>
                    <div class="form-group">
                        <label class="form-label" for="imdParentCode">IMD Parent Code</label>
                        <input type="text" id="imdParentCode" name="imdParentCode" class="form-control" maxlength="20">
                    </div>
                </div>
            </div>

            <div class="form-section">
                <h2 class="section-title">Credit Information</h2>
                <div class="form-grid">
                    <div class="form-group">
                        <label class="form-label" for="creditStartDate">Credit Start Date</label>
                        <input type="date" id="creditStartDate" name="creditStartDate" class="form-control">
                    </div>
                    <div class="form-group">
                        <label class="form-label" for="creditEndDate">Credit End Date</label>
                        <input type="date" id="creditEndDate" name="creditEndDate" class="form-control">
                    </div>
                    <div class="form-group">
                        <label class="form-label" for="parentCreditLimit">Parent Credit Limit</label>
                        <input type="text" id="parentCreditLimit" name="parentCreditLimit" class="form-control" maxlength="20">
                    </div>
                    <div class="form-group">
                        <label class="form-label" for="creditPeriod">Credit Period</label>
                        <input type="text" id="creditPeriod" name="creditPeriod" class="form-control" maxlength="20">
                    </div>
                </div>
            </div>

            <div class="form-section">
                <h2 class="section-title">Insurance Details</h2>
                <div class="form-grid">
                    <div class="form-group">
                        <label class="form-label" for="insurenceName">Insurance Name</label>
                        <input type="text" id="insurenceName" name="insurenceName" class="form-control" maxlength="200">
                    </div>
                    <div class="form-group">
                        <label class="form-label" for="acdNumber">ACD Number</label>
                        <input type="text" id="acdNumber" name="acdNumber" class="form-control" maxlength="200">
                    </div>
                    <div class="form-group">
                        <label class="form-label" for="cdCode">CD Code</label>
                        <input type="text" id="cdCode" name="cdCode" class="form-control" maxlength="200">
                    </div>
                    <div class="form-group">
                        <label class="form-label" for="agreementCode">Agreement Code</label>
                        <input type="text" id="agreementCode" name="agreementCode" class="form-control" maxlength="50">
                    </div>
                </div>
            </div>

            <div class="form-section">
                <h2 class="section-title">Branch & Management</h2>
                <div class="form-grid">
                    <div class="form-group">
                        <label class="form-label" for="sbigicBranch">SBIGIC Branch</label>
                        <select id="sbigicBranch" name="sbigicBranch" class="form-control">
                            <option value="">Select Branch</option>
                            <option value="branch1">Main Branch</option>
                            <option value="branch2">Downtown Office</option>
                            <option value="branch3">Business District</option>
                            <option value="branch4">West End</option>
                        </select>
                    </div>
                    <div class="form-group">
                        <label class="form-label" for="region">Region</label>
                        <select id="region" name="region" class="form-control">
                            <option value="">Select Region</option>
                            <option value="north">North</option>
                            <option value="south">South</option>
                            <option value="east">East</option>
                            <option value="west">West</option>
                        </select>
                    </div>
                    <div class="form-group">
                        <label class="form-label" for="rmName">RM Name</label>
                        <input type="text" id="rmName" name="rmName" class="form-control" maxlength="200">
                    </div>
                    <div class="form-group">
                        <label class="form-label" for="rmId">RM ID</label>
                        <input type="number" id="rmId" name="rmId" class="form-control">
                    </div>
                </div>
            </div>

            <div class="button-group">
                <button type="button" class="btn btn-secondary" onclick="resetForm()">Reset</button>
                <button type="submit" class="btn btn-primary">Submit</button>
            </div>
        </form>
    </div>

    <script>
        function handleSubmit(event) {
            event.preventDefault();
            const form = event.target;
            const formData = new FormData(form);
            const data = Object.fromEntries(formData.entries());
            
            // Simulate form submission
            setTimeout(() => {
                console.log('Form data:', data);
                document.getElementById('successMessage').style.display = 'block';
                form.reset();
                
                // Hide success message after 3 seconds
                setTimeout(() => {
                    document.getElementById('successMessage').style.display = 'none';
                }, 3000);
            }, 1000);
        }

        function resetForm() {
            document.getElementById('creditForm').reset();
            document.getElementById('successMessage').style.display = 'none';
        }

        // Date validation
        const startDate = document.getElementById('creditStartDate');
        const endDate = document.getElementById('creditEndDate');

        endDate.addEventListener('change', () => {
            if (startDate.value && endDate.value && new Date(endDate.value) < new Date(startDate.value)) {
                endDate.setCustomValidity('End date must be after start date');
            } else {
                endDate.setCustomValidity('');
            }
        });
    </script>
</body>
</html> this is my html take input from it and give me sprinboot api and then need to insert in the database desc Tbl_Imd_Parent_Code
Name                Null     Type          
------------------- -------- ------------- 
PID                 NOT NULL VARCHAR2(20)  
IMD_PARENT_CODE              VARCHAR2(20)  
CREDIT_START_DATE            VARCHAR2(50)  
CREDIT_END_DATE              VARCHAR2(50)  
PARENT_CREDIT_LIMIT          VARCHAR2(20)  
INSURENCENAME                VARCHAR2(200) 
ACDNUMBER                    VARCHAR2(200) 
CREDITPERIOD                 VARCHAR2(20)  
CDCODE                       VARCHAR2(200) 
AGREEMENT_CODE               VARCHAR2(50)  
SBIGIC_BRANCH                VARCHAR2(200) 
REGION                       VARCHAR2(200) 
RM_NAME                      VARCHAR2(200) 
RM_ID                        NUMBER  this is the table