Comprehensive Tabbed Interface - 6 Tabs! πŸš€

Ultimate showcase: Organization (5 levels deep) + Kitchen Sink (ALL inputs) + Contacts + Scheduling + Media + Settings Async

Complete Feature Showcase

Explore all 6 tabs to see every feature of Pydantic SchemaForms

Contact's first name
Contact's last name
Primary email address
Company or organization
Position or role
Birth date (optional)
Type of phone number
Contact phone number
Is this the primary contact number?
Type of phone number
Contact phone number
Is this the primary contact number?
Add multiple phone numbers
Type of address
Primary street address
Apartment, suite, unit, etc.
City name
State or province
ZIP or postal code
globe
Country
Type of address
Primary street address
Apartment, suite, unit, etc.
City name
State or province
ZIP or postal code
globe
Country
Add multiple addresses
Any additional information
Rendered in 0.073s
Debug panel (development only) β€” 0.073s render
<style data-schemaforms-layout-support>
.pydantic-form,
.md-form {
    width: 100%;
    max-width: none;
}

.pydantic-form > div,
.pydantic-form > fieldset,
.pydantic-form > [class*="row"],
.md-form > div,
.md-form > fieldset,
.md-form > [class*="row"] {
    width: 100% !important;
    max-width: none !important;
}

.pydantic-form [class*="col-"],
.md-form [class*="col-"] {
    min-width: 0;
    flex: 1 1 auto !important;
}

.pydantic-form [class*="section"],
.pydantic-form [data-schemaforms-section],
.pydantic-form fieldset,
.md-form [class*="section"],
.md-form [data-schemaforms-section],
.md-form fieldset {
    width: 100% !important;
    max-width: none !important;
    box-sizing: border-box;
}
</style>


<form id=""
      class="pydantic-form "
      style=""
      method="POST"
      action="/organization?style=none"
      novalidate>
    
    
<section class="layout-field-section">
    <h3 class="layout-field-title">Complete Feature Showcase</h3>
    
<p class="layout-field-help">Explore all 6 tabs to see every feature of Pydantic SchemaForms</p>

    <div class="layout-field-content">
        
<div class="tab-layout tabbed-layout" style="">
    <div class="tab-navigation" role="tablist">
        
<button class="tab-button active"
        type="button"
        role="tab"
        aria-selected="true"
        aria-controls="tab-0"
        onclick="switchTab('tab-0', this)">
    Contacts
</button>


<button class="tab-button"
        type="button"
        role="tab"
        aria-selected="false"
        aria-controls="tab-1"
        onclick="switchTab('tab-1', this)">
    Kitchen Sink
</button>


<button class="tab-button"
        type="button"
        role="tab"
        aria-selected="false"
        aria-controls="tab-2"
        onclick="switchTab('tab-2', this)">
    Media
</button>


<button class="tab-button"
        type="button"
        role="tab"
        aria-selected="false"
        aria-controls="tab-3"
        onclick="switchTab('tab-3', this)">
    Organization
</button>


<button class="tab-button"
        type="button"
        role="tab"
        aria-selected="false"
        aria-controls="tab-4"
        onclick="switchTab('tab-4', this)">
    Scheduling
</button>


<button class="tab-button"
        type="button"
        role="tab"
        aria-selected="false"
        aria-controls="tab-5"
        onclick="switchTab('tab-5', this)">
    Settings
</button>

    </div>
    <div class="tab-content">
        
<div id="tab-0"
     class="tab-panel active"
     role="tabpanel"
     style="display: block;"
     aria-hidden="false">
    <div class="vertical-layout vertical-layout" style="display: flex; flex-direction: column; gap: 1rem; align-items: stretch"><div class="field"><label for="first_name">First Name *</label>
<input name="first_name" id="first_name" value="John" required="required" minlength="1" maxlength="100" placeholder="John" type="text" />
<div class="help-text">Contact&#x27;s first name</div></div>
<div class="field"><label for="last_name">Last Name *</label>
<input name="last_name" id="last_name" value="Smith" required="required" minlength="1" maxlength="100" placeholder="Doe" type="text" />
<div class="help-text">Contact&#x27;s last name</div></div>
<div class="field"><label for="email">Primary Email *</label>
<input name="email" id="email" value="john.smith@example.com" required="required" placeholder="john.doe@example.com" inputmode="email" type="email" />
<div class="help-text">Primary email address</div></div>
<div class="field"><label for="company">Company</label>
<input name="company" id="company" value="Acme Corporation" placeholder="Acme Corporation" type="text" />
<div class="help-text">Company or organization</div></div>
<div class="field"><label for="job_title">Job Title</label>
<input name="job_title" id="job_title" value="Senior Software Engineer" placeholder="Software Engineer" type="text" />
<div class="help-text">Position or role</div></div>
<div class="field"><label for="birth_date">Date of Birth</label>
<div class="birthdate-input-group"><input name="birth_date" id="birth_date" value="1985-04-12" max="2026-03-07" min="1876-01-01" type="date" />
            <div class="age-display" id="birth_date_age" style="margin-top: 5px; font-size: 0.9em; color: #666;"></div>
            <script>
            document.addEventListener('DOMContentLoaded', function() {
                const birthdateField = document.getElementById('birth_date');
                const ageDisplay = document.getElementById('birth_date_age');

                function calculateAge() {
                    if (birthdateField.value && ageDisplay) {
                        const birthDate = new Date(birthdateField.value);
                        const today = new Date();
                        let age = today.getFullYear() - birthDate.getFullYear();
                        const monthDiff = today.getMonth() - birthDate.getMonth();

                        if (monthDiff < 0 || (monthDiff === 0 && today.getDate() < birthDate.getDate())) {
                            age--;
                        }

                        ageDisplay.textContent = age >= 0 ? `Age: ${age} years` : '';
                    }
                }

                if (birthdateField) {
                    birthdateField.addEventListener('change', calculateAge);
                    calculateAge(); // Calculate on load if value is set
                }
            });
            </script>
            </div>
<div class="help-text">Birth date (optional)</div></div>

<div class="model-list-block" data-field-name="phone_numbers" data-min-items="0" data-max-items="10">
    <div class="model-list-items" id="phone_numbers-items"><template class="model-list-item-template">
        <div class="model-list-item card border mb-3"
             data-index="0"
             data-title-template="πŸ“ž {phone_type}: {number}"
             data-field-name="phone_numbers">
            <div class="card-header d-flex justify-content-between align-items-center">
                <h6 class="mb-0">
                    <button class="btn btn-link text-decoration-none p-0 text-start"
                            type="button"
                            data-bs-toggle="collapse"
                            data-bs-target="#phone_numbers_item_0_content"
                            aria-expanded="true"
                            aria-controls="phone_numbers_item_0_content">
                        <i class="bi bi-chevron-down me-2"></i>
                        <i class="bi bi-card-list me-2"></i>
                        Item #1
                    </button>
                </h6>
                <button type="button"
                        class="btn btn-outline-danger btn-sm remove-item-btn"
                        data-index="0"
                        data-field-name="phone_numbers"
                        title="Remove this item">
                    <i class="bi bi-trash"></i>
                </button>
            </div>
            <div class="collapse  show" id="phone_numbers_item_0_content">
                <div class="card-body"><div class="row">
                <div class="col-md-6">
                    <div class="field"><div class="field">
<label for="phone_numbers[0].phone_type">Type</label>
<select name="phone_numbers[0].phone_type" id="phone_numbers[0].phone_type"><option value="mobile">πŸ“± Mobile</option>
<option value="work">πŸ’Ό Work</option>
<option value="home">🏠 Home</option>
<option value="fax">πŸ“  Fax</option></select>
<div class="help-text">Type of phone number</div>
</div></div>
                </div>
                <div class="col-md-6">
                    <div class="field"><label for="phone_numbers[0].number">Phone Number</label>
<input name="phone_numbers[0].number" id="phone_numbers[0].number" maxlength="20" placeholder="+1 (555) 123-4567" inputmode="tel" autocomplete="tel" type="tel" />
<div class="help-text">Contact phone number</div></div>
                </div>
                <div class="col-md-6">
                    <div class="field"><label for="phone_numbers[0].is_primary">Primary Number</label>
<input name="phone_numbers[0].is_primary" id="phone_numbers[0].is_primary" value="1" type="checkbox" />
<div class="help-text">Is this the primary contact number?</div></div>
                </div></div>
                </div>
            </div>
        </div></template>
        <div class="model-list-item card border mb-3"
             data-index="0"
             data-title-template="πŸ“ž {phone_type}: {number}"
             data-field-name="phone_numbers">
            <div class="card-header d-flex justify-content-between align-items-center">
                <h6 class="mb-0">
                    <button class="btn btn-link text-decoration-none p-0 text-start"
                            type="button"
                            data-bs-toggle="collapse"
                            data-bs-target="#phone_numbers_item_0_content"
                            aria-expanded="true"
                            aria-controls="phone_numbers_item_0_content">
                        <i class="bi bi-chevron-down me-2"></i>
                        <i class="bi bi-card-list me-2"></i>
                        πŸ“ž mobile: +1 (555) 123-4567
                    </button>
                </h6>
                <button type="button"
                        class="btn btn-outline-danger btn-sm remove-item-btn"
                        data-index="0"
                        data-field-name="phone_numbers"
                        title="Remove this item">
                    <i class="bi bi-trash"></i>
                </button>
            </div>
            <div class="collapse  show" id="phone_numbers_item_0_content">
                <div class="card-body"><div class="row">
                <div class="col-md-6">
                    <div class="field"><div class="field">
<label for="phone_numbers[0].phone_type">Type</label>
<select name="phone_numbers[0].phone_type" id="phone_numbers[0].phone_type"><option value="mobile" selected>πŸ“± Mobile</option>
<option value="work">πŸ’Ό Work</option>
<option value="home">🏠 Home</option>
<option value="fax">πŸ“  Fax</option></select>
<div class="help-text">Type of phone number</div>
</div></div>
                </div>
                <div class="col-md-6">
                    <div class="field"><label for="phone_numbers[0].number">Phone Number</label>
<input name="phone_numbers[0].number" id="phone_numbers[0].number" value="+1 (555) 123-4567" maxlength="20" placeholder="+1 (555) 123-4567" inputmode="tel" autocomplete="tel" type="tel" />
<div class="help-text">Contact phone number</div></div>
                </div>
                <div class="col-md-6">
                    <div class="field"><label for="phone_numbers[0].is_primary">Primary Number</label>
<input name="phone_numbers[0].is_primary" id="phone_numbers[0].is_primary" checked="checked" value="1" type="checkbox" />
<div class="help-text">Is this the primary contact number?</div></div>
                </div></div>
                </div>
            </div>
        </div>
        <div class="model-list-item card border mb-3"
             data-index="1"
             data-title-template="πŸ“ž {phone_type}: {number}"
             data-field-name="phone_numbers">
            <div class="card-header d-flex justify-content-between align-items-center">
                <h6 class="mb-0">
                    <button class="btn btn-link text-decoration-none p-0 text-start"
                            type="button"
                            data-bs-toggle="collapse"
                            data-bs-target="#phone_numbers_item_1_content"
                            aria-expanded="true"
                            aria-controls="phone_numbers_item_1_content">
                        <i class="bi bi-chevron-down me-2"></i>
                        <i class="bi bi-card-list me-2"></i>
                        πŸ“ž work: +1 (555) 987-6543
                    </button>
                </h6>
                <button type="button"
                        class="btn btn-outline-danger btn-sm remove-item-btn"
                        data-index="1"
                        data-field-name="phone_numbers"
                        title="Remove this item">
                    <i class="bi bi-trash"></i>
                </button>
            </div>
            <div class="collapse  show" id="phone_numbers_item_1_content">
                <div class="card-body"><div class="row">
                <div class="col-md-6">
                    <div class="field"><div class="field">
<label for="phone_numbers[1].phone_type">Type</label>
<select name="phone_numbers[1].phone_type" id="phone_numbers[1].phone_type"><option value="mobile">πŸ“± Mobile</option>
<option value="work" selected>πŸ’Ό Work</option>
<option value="home">🏠 Home</option>
<option value="fax">πŸ“  Fax</option></select>
<div class="help-text">Type of phone number</div>
</div></div>
                </div>
                <div class="col-md-6">
                    <div class="field"><label for="phone_numbers[1].number">Phone Number</label>
<input name="phone_numbers[1].number" id="phone_numbers[1].number" value="+1 (555) 987-6543" maxlength="20" placeholder="+1 (555) 123-4567" inputmode="tel" autocomplete="tel" type="tel" />
<div class="help-text">Contact phone number</div></div>
                </div>
                <div class="col-md-6">
                    <div class="field"><label for="phone_numbers[1].is_primary">Primary Number</label>
<input name="phone_numbers[1].is_primary" id="phone_numbers[1].is_primary" value="1" type="checkbox" />
<div class="help-text">Is this the primary contact number?</div></div>
                </div></div>
                </div>
            </div>
        </div></div>
    <button type="button" class="add-item-btn" data-target="phone_numbers">Add Item</button>
    
<div class="model-list-help">Add multiple phone numbers</div>

    
</div>


<div class="model-list-block" data-field-name="addresses" data-min-items="0" data-max-items="5">
    <div class="model-list-items" id="addresses-items"><template class="model-list-item-template">
        <div class="model-list-item card border mb-3"
             data-index="0"
             data-title-template="πŸ“ {address_type}: {city}, {state}"
             data-field-name="addresses">
            <div class="card-header d-flex justify-content-between align-items-center">
                <h6 class="mb-0">
                    <button class="btn btn-link text-decoration-none p-0 text-start"
                            type="button"
                            data-bs-toggle="collapse"
                            data-bs-target="#addresses_item_0_content"
                            aria-expanded="false"
                            aria-controls="addresses_item_0_content">
                        <i class="bi bi-chevron-right me-2"></i>
                        <i class="bi bi-card-list me-2"></i>
                        Item #1
                    </button>
                </h6>
                <button type="button"
                        class="btn btn-outline-danger btn-sm remove-item-btn"
                        data-index="0"
                        data-field-name="addresses"
                        title="Remove this item">
                    <i class="bi bi-trash"></i>
                </button>
            </div>
            <div class="collapse collapse show" id="addresses_item_0_content">
                <div class="card-body"><div class="row">
                <div class="col-lg-4 col-md-6">
                    <div class="field"><div class="field">
<label for="addresses[0].address_type">Address Type</label>
<select name="addresses[0].address_type" id="addresses[0].address_type"><option value="home">🏠 Home</option>
<option value="work">πŸ’Ό Work</option>
<option value="billing">πŸ’³ Billing</option>
<option value="shipping">πŸ“¦ Shipping</option></select>
<div class="help-text">Type of address</div>
</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="addresses[0].street_line1">Street Address Line 1</label>
<input name="addresses[0].street_line1" id="addresses[0].street_line1" maxlength="200" placeholder="123 Main Street" type="text" />
<div class="help-text">Primary street address</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="addresses[0].street_line2">Street Address Line 2</label>
<input name="addresses[0].street_line2" id="addresses[0].street_line2" placeholder="Apt 4B" type="text" />
<div class="help-text">Apartment, suite, unit, etc.</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="addresses[0].city">City</label>
<input name="addresses[0].city" id="addresses[0].city" maxlength="100" placeholder="San Francisco" type="text" />
<div class="help-text">City name</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="addresses[0].state">State/Province</label>
<input name="addresses[0].state" id="addresses[0].state" maxlength="50" placeholder="CA" type="text" />
<div class="help-text">State or province</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="addresses[0].postal_code">Postal Code</label>
<input name="addresses[0].postal_code" id="addresses[0].postal_code" maxlength="20" placeholder="94105" type="text" />
<div class="help-text">ZIP or postal code</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><div class="field">
<label for="addresses[0].country">Country</label>
<div class="input-with-icon"><span class="input-icon">globe</span>
<select name="addresses[0].country" id="addresses[0].country"><option value="US">πŸ‡ΊπŸ‡Έ United States</option>
<option value="CA">πŸ‡¨πŸ‡¦ Canada</option>
<option value="UK">πŸ‡¬πŸ‡§ United Kingdom</option>
<option value="AU">πŸ‡¦πŸ‡Ί Australia</option>
<option value="DE">πŸ‡©πŸ‡ͺ Germany</option>
<option value="FR">πŸ‡«πŸ‡· France</option>
<option value="JP">πŸ‡―πŸ‡΅ Japan</option></select>
</div>
<div class="help-text">Country</div>
</div></div>
                </div></div>
                </div>
            </div>
        </div></template>
        <div class="model-list-item card border mb-3"
             data-index="0"
             data-title-template="πŸ“ {address_type}: {city}, {state}"
             data-field-name="addresses">
            <div class="card-header d-flex justify-content-between align-items-center">
                <h6 class="mb-0">
                    <button class="btn btn-link text-decoration-none p-0 text-start"
                            type="button"
                            data-bs-toggle="collapse"
                            data-bs-target="#addresses_item_0_content"
                            aria-expanded="false"
                            aria-controls="addresses_item_0_content">
                        <i class="bi bi-chevron-right me-2"></i>
                        <i class="bi bi-card-list me-2"></i>
                        πŸ“ home: San Francisco, CA
                    </button>
                </h6>
                <button type="button"
                        class="btn btn-outline-danger btn-sm remove-item-btn"
                        data-index="0"
                        data-field-name="addresses"
                        title="Remove this item">
                    <i class="bi bi-trash"></i>
                </button>
            </div>
            <div class="collapse collapse show" id="addresses_item_0_content">
                <div class="card-body"><div class="row">
                <div class="col-lg-4 col-md-6">
                    <div class="field"><div class="field">
<label for="addresses[0].address_type">Address Type</label>
<select name="addresses[0].address_type" id="addresses[0].address_type"><option value="home" selected>🏠 Home</option>
<option value="work">πŸ’Ό Work</option>
<option value="billing">πŸ’³ Billing</option>
<option value="shipping">πŸ“¦ Shipping</option></select>
<div class="help-text">Type of address</div>
</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="addresses[0].street_line1">Street Address Line 1</label>
<input name="addresses[0].street_line1" id="addresses[0].street_line1" value="123 Main Street" maxlength="200" placeholder="123 Main Street" type="text" />
<div class="help-text">Primary street address</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="addresses[0].street_line2">Street Address Line 2</label>
<input name="addresses[0].street_line2" id="addresses[0].street_line2" value="Apt 4B" placeholder="Apt 4B" type="text" />
<div class="help-text">Apartment, suite, unit, etc.</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="addresses[0].city">City</label>
<input name="addresses[0].city" id="addresses[0].city" value="San Francisco" maxlength="100" placeholder="San Francisco" type="text" />
<div class="help-text">City name</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="addresses[0].state">State/Province</label>
<input name="addresses[0].state" id="addresses[0].state" value="CA" maxlength="50" placeholder="CA" type="text" />
<div class="help-text">State or province</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="addresses[0].postal_code">Postal Code</label>
<input name="addresses[0].postal_code" id="addresses[0].postal_code" value="94105" maxlength="20" placeholder="94105" type="text" />
<div class="help-text">ZIP or postal code</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><div class="field">
<label for="addresses[0].country">Country</label>
<div class="input-with-icon"><span class="input-icon">globe</span>
<select name="addresses[0].country" id="addresses[0].country"><option value="US" selected>πŸ‡ΊπŸ‡Έ United States</option>
<option value="CA">πŸ‡¨πŸ‡¦ Canada</option>
<option value="UK">πŸ‡¬πŸ‡§ United Kingdom</option>
<option value="AU">πŸ‡¦πŸ‡Ί Australia</option>
<option value="DE">πŸ‡©πŸ‡ͺ Germany</option>
<option value="FR">πŸ‡«πŸ‡· France</option>
<option value="JP">πŸ‡―πŸ‡΅ Japan</option></select>
</div>
<div class="help-text">Country</div>
</div></div>
                </div></div>
                </div>
            </div>
        </div>
        <div class="model-list-item card border mb-3"
             data-index="1"
             data-title-template="πŸ“ {address_type}: {city}, {state}"
             data-field-name="addresses">
            <div class="card-header d-flex justify-content-between align-items-center">
                <h6 class="mb-0">
                    <button class="btn btn-link text-decoration-none p-0 text-start"
                            type="button"
                            data-bs-toggle="collapse"
                            data-bs-target="#addresses_item_1_content"
                            aria-expanded="false"
                            aria-controls="addresses_item_1_content">
                        <i class="bi bi-chevron-right me-2"></i>
                        <i class="bi bi-card-list me-2"></i>
                        πŸ“ work: Palo Alto, CA
                    </button>
                </h6>
                <button type="button"
                        class="btn btn-outline-danger btn-sm remove-item-btn"
                        data-index="1"
                        data-field-name="addresses"
                        title="Remove this item">
                    <i class="bi bi-trash"></i>
                </button>
            </div>
            <div class="collapse collapse show" id="addresses_item_1_content">
                <div class="card-body"><div class="row">
                <div class="col-lg-4 col-md-6">
                    <div class="field"><div class="field">
<label for="addresses[1].address_type">Address Type</label>
<select name="addresses[1].address_type" id="addresses[1].address_type"><option value="home">🏠 Home</option>
<option value="work" selected>πŸ’Ό Work</option>
<option value="billing">πŸ’³ Billing</option>
<option value="shipping">πŸ“¦ Shipping</option></select>
<div class="help-text">Type of address</div>
</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="addresses[1].street_line1">Street Address Line 1</label>
<input name="addresses[1].street_line1" id="addresses[1].street_line1" value="456 Corporate Blvd" maxlength="200" placeholder="123 Main Street" type="text" />
<div class="help-text">Primary street address</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="addresses[1].street_line2">Street Address Line 2</label>
<input name="addresses[1].street_line2" id="addresses[1].street_line2" value="Suite 200" placeholder="Apt 4B" type="text" />
<div class="help-text">Apartment, suite, unit, etc.</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="addresses[1].city">City</label>
<input name="addresses[1].city" id="addresses[1].city" value="Palo Alto" maxlength="100" placeholder="San Francisco" type="text" />
<div class="help-text">City name</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="addresses[1].state">State/Province</label>
<input name="addresses[1].state" id="addresses[1].state" value="CA" maxlength="50" placeholder="CA" type="text" />
<div class="help-text">State or province</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="addresses[1].postal_code">Postal Code</label>
<input name="addresses[1].postal_code" id="addresses[1].postal_code" value="94301" maxlength="20" placeholder="94105" type="text" />
<div class="help-text">ZIP or postal code</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><div class="field">
<label for="addresses[1].country">Country</label>
<div class="input-with-icon"><span class="input-icon">globe</span>
<select name="addresses[1].country" id="addresses[1].country"><option value="US" selected>πŸ‡ΊπŸ‡Έ United States</option>
<option value="CA">πŸ‡¨πŸ‡¦ Canada</option>
<option value="UK">πŸ‡¬πŸ‡§ United Kingdom</option>
<option value="AU">πŸ‡¦πŸ‡Ί Australia</option>
<option value="DE">πŸ‡©πŸ‡ͺ Germany</option>
<option value="FR">πŸ‡«πŸ‡· France</option>
<option value="JP">πŸ‡―πŸ‡΅ Japan</option></select>
</div>
<div class="help-text">Country</div>
</div></div>
                </div></div>
                </div>
            </div>
        </div></div>
    <button type="button" class="add-item-btn" data-target="addresses">Add Item</button>
    
<div class="model-list-help">Add multiple addresses</div>

    
</div>

<div class="field"><label for="notes">Notes</label>
<textarea name="notes" id="notes" placeholder="Additional notes about this contact...">Prefers email communication. Available Monday-Friday 9am-5pm PST.</textarea>
<div class="help-text">Any additional information</div></div></div>
</div>


<div id="tab-1"
     class="tab-panel"
     role="tabpanel"
     style="display: none;"
     aria-hidden="true">
    <div class="vertical-layout vertical-layout" style="display: flex; flex-direction: column; gap: 1rem; align-items: stretch"><div class="field"><label for="text_input">Text Input *</label>
<input name="text_input" id="text_input" value="Sample text value" required="required" maxlength="100" placeholder="Enter any text" type="text" />
<div class="help-text">Standard text input field</div></div>
<div class="field"><label for="email_input">Email Input *</label>
<input name="email_input" id="email_input" value="user@example.com" required="required" placeholder="user@example.com" inputmode="email" type="email" />
<div class="help-text">Email address with validation</div></div>
<div class="field"><label for="password_input">Password Input *</label>
<input name="password_input" id="password_input" value="SecurePass123!" required="required" minlength="8" placeholder="Enter password" autocomplete="new-password" type="password" />
<div class="help-text">Password field (masked input)</div></div>
<div class="field"><label for="search_input">Search Input *</label>
<input name="search_input" id="search_input" value="search query" required="required" placeholder="Search..." inputmode="search" type="search" />
<div class="help-text">Search field with special styling</div></div>
<div class="field"><label for="url_input">URL Input *</label>
<input name="url_input" id="url_input" value="https://example.com" required="required" placeholder="https://example.com" inputmode="url" pattern="https?://.+" type="url" />
<div class="help-text">URL field with validation</div></div>
<div class="field"><label for="tel_input">Telephone Input *</label>
<input name="tel_input" id="tel_input" value="+1-555-987-6543" required="required" placeholder="+1-555-123-4567" inputmode="tel" autocomplete="tel" type="tel" />
<div class="help-text">Telephone number input</div></div>
<div class="field"><label for="textarea_input">Text Area *</label>
<textarea name="textarea_input" id="textarea_input" required="required" maxlength="500" placeholder="Enter multiple lines of text...">This is a multi-line
text area
with sample content.</textarea>
<div class="help-text">Multi-line text input</div></div>
<div class="field"><label for="number_input">Number Input (Integer)</label>
<input name="number_input" id="number_input" value="42" min="0" max="1000" step="0.1" placeholder="50.0%" inputmode="numeric" type="number" />
<div class="help-text">Integer number input</div></div>
<div class="field"><label for="decimal_input">Decimal Input (Float)</label>
<input name="decimal_input" id="decimal_input" value="3.14159" min="0.0" max="999.99" step="0.1" placeholder="50.0%" inputmode="numeric" type="number" />
<div class="help-text">Floating-point number input</div></div>
<div class="field"><label for="range_input">Range Slider</label>
<input name="range_input" id="range_input" value="75" min="1" max="5" step="1" type="range" />
        <div class="star-rating" id="range_input-stars">
            β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…
        </div>
        <script>
        document.addEventListener('DOMContentLoaded', function() {
            const range = document.getElementById('range_input');
            const stars = document.getElementById('range_input-stars');
            if (range && stars) {
                range.addEventListener('input', function() {
                    const value = parseInt(this.value);
                    const maxRating = 5;
                    stars.textContent = 'β˜…'.repeat(value) + 'β˜†'.repeat(maxRating - value);
                });
            }
        });
        </script>
        
<div class="help-text">Slider for selecting a value</div></div>
<div class="field"><div class="field">
<label for="select_input">Select Dropdown</label>
<div class="input-with-icon"><span class="input-icon">ui-checks</span>
<select name="select_input" id="select_input"><option value="option1">Option 1</option>
<option value="option2">Option 2</option>
<option value="option3" selected>Option 3</option>
<option value="option4">Option 4</option></select>
</div>
<div class="help-text">Single select dropdown</div>
</div></div>
<div class="field"><div class="field">
<label for="radio_input">Radio Buttons</label>
<div class="input-with-icon"><span class="input-icon">ui-radios</span>
<fieldset class="radio-group" >
    <legend>Radio Buttons</legend>
    
            <div class="radio-item">
                <label for="radio_input_0">
                    <input name="radio_input" id="radio_input_0" type="radio" value="small" />
                    <span class="radio-label">Small</span>
                </label>
            </div>
            

            <div class="radio-item">
                <label for="radio_input_1">
                    <input name="radio_input" id="radio_input_1" type="radio" value="medium" />
                    <span class="radio-label">Medium</span>
                </label>
            </div>
            

            <div class="radio-item">
                <label for="radio_input_2">
                    <input name="radio_input" id="radio_input_2" type="radio" value="large" />
                    <span class="radio-label">Large</span>
                </label>
            </div>
            
</fieldset>
</div>
<div class="help-text">Radio button group</div>
</div></div>
<div class="field"><div class="field">
<label for="multiselect_input">Multiple Selection</label>
<div class="input-with-icon"><span class="input-icon">list-check</span>
<select name="multiselect_input" id="multiselect_input"><option value="python" selected>🐍 Python</option>
<option value="javascript">πŸ“œ JavaScript</option>
<option value="typescript" selected>πŸ“˜ TypeScript</option>
<option value="java">β˜• Java</option>
<option value="go">🐹 Go</option>
<option value="rust" selected>πŸ¦€ Rust</option></select>
</div>
<div class="help-text">Select multiple options</div>
</div></div>
<div class="field"><label for="checkbox_input">Checkbox Input</label>
<input name="checkbox_input" id="checkbox_input" checked="checked" value="1" type="checkbox" />
<div class="help-text">Boolean checkbox</div></div>
<div class="field"><label for="toggle_input">Toggle Switch</label>
<input name="toggle_input" id="toggle_input" value="1" type="checkbox" />
<div class="help-text">Boolean toggle switch</div></div>
<div class="field"><label for="date_input">Date Input *</label>
<div class="birthdate-input-group"><input name="date_input" id="date_input" value="2024-06-15" required="required" max="2026-03-07" min="1876-01-01" type="date" />
            <div class="age-display" id="date_input_age" style="margin-top: 5px; font-size: 0.9em; color: #666;"></div>
            <script>
            document.addEventListener('DOMContentLoaded', function() {
                const birthdateField = document.getElementById('date_input');
                const ageDisplay = document.getElementById('date_input_age');

                function calculateAge() {
                    if (birthdateField.value && ageDisplay) {
                        const birthDate = new Date(birthdateField.value);
                        const today = new Date();
                        let age = today.getFullYear() - birthDate.getFullYear();
                        const monthDiff = today.getMonth() - birthDate.getMonth();

                        if (monthDiff < 0 || (monthDiff === 0 && today.getDate() < birthDate.getDate())) {
                            age--;
                        }

                        ageDisplay.textContent = age >= 0 ? `Age: ${age} years` : '';
                    }
                }

                if (birthdateField) {
                    birthdateField.addEventListener('change', calculateAge);
                    calculateAge(); // Calculate on load if value is set
                }
            });
            </script>
            </div>
<div class="help-text">Date picker</div></div>
<div class="field"><label for="time_input">Time Input</label>
<input name="time_input" id="time_input" value="14:30" step="60" type="time" />
<div class="help-text">Time picker</div></div>
<div class="field"><label for="datetime_input">DateTime Input</label>
<input name="datetime_input" id="datetime_input" value="2024-06-15T14:30:00" type="datetime-local" />
<div class="help-text">Date and time picker</div></div>
<div class="field"><label for="color_input">Color Picker</label>
<div class="color-input-group"><input name="color_input" id="color_input" value="#e74c3c" type="color" />
            <div class="color-value-display" style="display: inline-flex; align-items: center; margin-left: 10px;">
                <span id="color_input_value" style="font-family: monospace;">#e74c3c</span>
                <div id="color_input_swatch" style="width: 20px; height: 20px; background-color: #e74c3c; border: 1px solid #ccc; margin-left: 5px;"></div>
            </div>
            <script>
            document.addEventListener('DOMContentLoaded', function() {
                const colorInput = document.getElementById('color_input');
                const valueSpan = document.getElementById('color_input_value');
                const swatch = document.getElementById('color_input_swatch');

                if (colorInput && valueSpan && swatch) {
                    colorInput.addEventListener('input', function() {
                        valueSpan.textContent = this.value;
                        swatch.style.backgroundColor = this.value;
                    });
                }
            });
            </script>
            </div>
<div class="help-text">Color selection input</div></div>
<div class="field"><!-- Error rendering hidden: CSRFInput.render() missing 1 required positional argument: 'token' --></div></div>
</div>


<div id="tab-2"
     class="tab-panel"
     role="tabpanel"
     style="display: none;"
     aria-hidden="true">
    <div class="vertical-layout vertical-layout" style="display: flex; flex-direction: column; gap: 1rem; align-items: stretch"><div class="field"><label for="profile_picture_url">Profile Picture URL</label>
<input name="profile_picture_url" id="profile_picture_url" value="https://example.com/avatars/user123.jpg" placeholder="https://example.com/avatar.jpg" inputmode="url" pattern="https?://.+" type="url" />
<div class="help-text">URL to profile picture</div></div>
<div class="field"><label for="background_image_url">Background Image URL</label>
<input name="background_image_url" id="background_image_url" value="https://example.com/backgrounds/abstract.jpg" placeholder="https://example.com/background.jpg" inputmode="url" pattern="https?://.+" type="url" />
<div class="help-text">URL to background image</div></div>
<div class="field"><label for="favicon_color">Favicon Color</label>
<div class="color-input-group"><input name="favicon_color" id="favicon_color" value="#3498db" type="color" />
            <div class="color-value-display" style="display: inline-flex; align-items: center; margin-left: 10px;">
                <span id="favicon_color_value" style="font-family: monospace;">#3498db</span>
                <div id="favicon_color_swatch" style="width: 20px; height: 20px; background-color: #3498db; border: 1px solid #ccc; margin-left: 5px;"></div>
            </div>
            <script>
            document.addEventListener('DOMContentLoaded', function() {
                const colorInput = document.getElementById('favicon_color');
                const valueSpan = document.getElementById('favicon_color_value');
                const swatch = document.getElementById('favicon_color_swatch');

                if (colorInput && valueSpan && swatch) {
                    colorInput.addEventListener('input', function() {
                        valueSpan.textContent = this.value;
                        swatch.style.backgroundColor = this.value;
                    });
                }
            });
            </script>
            </div>
<div class="help-text">Color for browser favicon</div></div>
<div class="field"><label for="enable_animations">Enable Animations</label>
<input name="enable_animations" id="enable_animations" checked="checked" value="1" type="checkbox" />
<div class="help-text">Show animated transitions?</div></div>
<div class="field"><label for="enable_sound">Enable Sound Effects</label>
<input name="enable_sound" id="enable_sound" value="1" type="checkbox" />
<div class="help-text">Play sound effects?</div></div>
<div class="field"><div class="field">
<label for="video_quality">Default Video Quality</label>
<div class="input-with-icon"><span class="input-icon">film</span>
<select name="video_quality" id="video_quality"><option value="auto">πŸ”„ Auto</option>
<option value="1080p" selected>🎬 1080p (HD)</option>
<option value="720p">πŸ“Ή 720p</option>
<option value="480p">πŸ“Ί 480p</option>
<option value="360p">πŸ“± 360p</option></select>
</div>
<div class="help-text">Preferred video playback quality</div>
</div></div>
<div class="field"><label for="autoplay_videos">Autoplay Videos</label>
<input name="autoplay_videos" id="autoplay_videos" value="1" type="checkbox" />
<div class="help-text">Automatically play videos?</div></div>

<div class="model-list-block" data-field-name="color_themes" data-min-items="0" data-max-items="10">
    <div class="model-list-items" id="color_themes-items"><template class="model-list-item-template">
        <div class="model-list-item card border mb-3"
             data-index="0"
             data-title-template="🎨 {theme_name}"
             data-field-name="color_themes">
            <div class="card-header d-flex justify-content-between align-items-center">
                <h6 class="mb-0">
                    <button class="btn btn-link text-decoration-none p-0 text-start"
                            type="button"
                            data-bs-toggle="collapse"
                            data-bs-target="#color_themes_item_0_content"
                            aria-expanded="true"
                            aria-controls="color_themes_item_0_content">
                        <i class="bi bi-chevron-down me-2"></i>
                        <i class="bi bi-card-list me-2"></i>
                        Item #1
                    </button>
                </h6>
                <button type="button"
                        class="btn btn-outline-danger btn-sm remove-item-btn"
                        data-index="0"
                        data-field-name="color_themes"
                        title="Remove this item">
                    <i class="bi bi-trash"></i>
                </button>
            </div>
            <div class="collapse  show" id="color_themes_item_0_content">
                <div class="card-body"><div class="row">
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="color_themes[0].theme_name">Theme Name</label>
<input name="color_themes[0].theme_name" id="color_themes[0].theme_name" maxlength="50" placeholder="Ocean Blue" type="text" />
<div class="help-text">Name for this color theme</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="color_themes[0].primary_color">Primary Color</label>
<div class="color-input-group"><input name="color_themes[0].primary_color" id="color_themes[0].primary_color" type="color" />
            <div class="color-value-display" style="display: inline-flex; align-items: center; margin-left: 10px;">
                <span id="color_themes[0].primary_color_value" style="font-family: monospace;"></span>
                <div id="color_themes[0].primary_color_swatch" style="width: 20px; height: 20px; background-color: ; border: 1px solid #ccc; margin-left: 5px;"></div>
            </div>
            <script>
            document.addEventListener('DOMContentLoaded', function() {
                const colorInput = document.getElementById('color_themes[0].primary_color');
                const valueSpan = document.getElementById('color_themes[0].primary_color_value');
                const swatch = document.getElementById('color_themes[0].primary_color_swatch');

                if (colorInput && valueSpan && swatch) {
                    colorInput.addEventListener('input', function() {
                        valueSpan.textContent = this.value;
                        swatch.style.backgroundColor = this.value;
                    });
                }
            });
            </script>
            </div>
<div class="help-text">Main brand color</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="color_themes[0].secondary_color">Secondary Color</label>
<div class="color-input-group"><input name="color_themes[0].secondary_color" id="color_themes[0].secondary_color" type="color" />
            <div class="color-value-display" style="display: inline-flex; align-items: center; margin-left: 10px;">
                <span id="color_themes[0].secondary_color_value" style="font-family: monospace;"></span>
                <div id="color_themes[0].secondary_color_swatch" style="width: 20px; height: 20px; background-color: ; border: 1px solid #ccc; margin-left: 5px;"></div>
            </div>
            <script>
            document.addEventListener('DOMContentLoaded', function() {
                const colorInput = document.getElementById('color_themes[0].secondary_color');
                const valueSpan = document.getElementById('color_themes[0].secondary_color_value');
                const swatch = document.getElementById('color_themes[0].secondary_color_swatch');

                if (colorInput && valueSpan && swatch) {
                    colorInput.addEventListener('input', function() {
                        valueSpan.textContent = this.value;
                        swatch.style.backgroundColor = this.value;
                    });
                }
            });
            </script>
            </div>
<div class="help-text">Secondary accent color</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="color_themes[0].accent_color">Accent Color</label>
<div class="color-input-group"><input name="color_themes[0].accent_color" id="color_themes[0].accent_color" type="color" />
            <div class="color-value-display" style="display: inline-flex; align-items: center; margin-left: 10px;">
                <span id="color_themes[0].accent_color_value" style="font-family: monospace;"></span>
                <div id="color_themes[0].accent_color_swatch" style="width: 20px; height: 20px; background-color: ; border: 1px solid #ccc; margin-left: 5px;"></div>
            </div>
            <script>
            document.addEventListener('DOMContentLoaded', function() {
                const colorInput = document.getElementById('color_themes[0].accent_color');
                const valueSpan = document.getElementById('color_themes[0].accent_color_value');
                const swatch = document.getElementById('color_themes[0].accent_color_swatch');

                if (colorInput && valueSpan && swatch) {
                    colorInput.addEventListener('input', function() {
                        valueSpan.textContent = this.value;
                        swatch.style.backgroundColor = this.value;
                    });
                }
            });
            </script>
            </div>
<div class="help-text">Highlight color</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="color_themes[0].background_color">Background Color</label>
<div class="color-input-group"><input name="color_themes[0].background_color" id="color_themes[0].background_color" type="color" />
            <div class="color-value-display" style="display: inline-flex; align-items: center; margin-left: 10px;">
                <span id="color_themes[0].background_color_value" style="font-family: monospace;"></span>
                <div id="color_themes[0].background_color_swatch" style="width: 20px; height: 20px; background-color: ; border: 1px solid #ccc; margin-left: 5px;"></div>
            </div>
            <script>
            document.addEventListener('DOMContentLoaded', function() {
                const colorInput = document.getElementById('color_themes[0].background_color');
                const valueSpan = document.getElementById('color_themes[0].background_color_value');
                const swatch = document.getElementById('color_themes[0].background_color_swatch');

                if (colorInput && valueSpan && swatch) {
                    colorInput.addEventListener('input', function() {
                        valueSpan.textContent = this.value;
                        swatch.style.backgroundColor = this.value;
                    });
                }
            });
            </script>
            </div>
<div class="help-text">Page background color</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="color_themes[0].text_color">Text Color</label>
<div class="color-input-group"><input name="color_themes[0].text_color" id="color_themes[0].text_color" type="color" />
            <div class="color-value-display" style="display: inline-flex; align-items: center; margin-left: 10px;">
                <span id="color_themes[0].text_color_value" style="font-family: monospace;"></span>
                <div id="color_themes[0].text_color_swatch" style="width: 20px; height: 20px; background-color: ; border: 1px solid #ccc; margin-left: 5px;"></div>
            </div>
            <script>
            document.addEventListener('DOMContentLoaded', function() {
                const colorInput = document.getElementById('color_themes[0].text_color');
                const valueSpan = document.getElementById('color_themes[0].text_color_value');
                const swatch = document.getElementById('color_themes[0].text_color_swatch');

                if (colorInput && valueSpan && swatch) {
                    colorInput.addEventListener('input', function() {
                        valueSpan.textContent = this.value;
                        swatch.style.backgroundColor = this.value;
                    });
                }
            });
            </script>
            </div>
<div class="help-text">Primary text color</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="color_themes[0].is_default">Set as Default</label>
<input name="color_themes[0].is_default" id="color_themes[0].is_default" value="1" type="checkbox" />
<div class="help-text">Use this as the default theme?</div></div>
                </div></div>
                </div>
            </div>
        </div></template>
        <div class="model-list-item card border mb-3"
             data-index="0"
             data-title-template="🎨 {theme_name}"
             data-field-name="color_themes">
            <div class="card-header d-flex justify-content-between align-items-center">
                <h6 class="mb-0">
                    <button class="btn btn-link text-decoration-none p-0 text-start"
                            type="button"
                            data-bs-toggle="collapse"
                            data-bs-target="#color_themes_item_0_content"
                            aria-expanded="true"
                            aria-controls="color_themes_item_0_content">
                        <i class="bi bi-chevron-down me-2"></i>
                        <i class="bi bi-card-list me-2"></i>
                        🎨 Ocean Blue
                    </button>
                </h6>
                <button type="button"
                        class="btn btn-outline-danger btn-sm remove-item-btn"
                        data-index="0"
                        data-field-name="color_themes"
                        title="Remove this item">
                    <i class="bi bi-trash"></i>
                </button>
            </div>
            <div class="collapse  show" id="color_themes_item_0_content">
                <div class="card-body"><div class="row">
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="color_themes[0].theme_name">Theme Name</label>
<input name="color_themes[0].theme_name" id="color_themes[0].theme_name" value="Ocean Blue" maxlength="50" placeholder="Ocean Blue" type="text" />
<div class="help-text">Name for this color theme</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="color_themes[0].primary_color">Primary Color</label>
<div class="color-input-group"><input name="color_themes[0].primary_color" id="color_themes[0].primary_color" value="#3498db" type="color" />
            <div class="color-value-display" style="display: inline-flex; align-items: center; margin-left: 10px;">
                <span id="color_themes[0].primary_color_value" style="font-family: monospace;">#3498db</span>
                <div id="color_themes[0].primary_color_swatch" style="width: 20px; height: 20px; background-color: #3498db; border: 1px solid #ccc; margin-left: 5px;"></div>
            </div>
            <script>
            document.addEventListener('DOMContentLoaded', function() {
                const colorInput = document.getElementById('color_themes[0].primary_color');
                const valueSpan = document.getElementById('color_themes[0].primary_color_value');
                const swatch = document.getElementById('color_themes[0].primary_color_swatch');

                if (colorInput && valueSpan && swatch) {
                    colorInput.addEventListener('input', function() {
                        valueSpan.textContent = this.value;
                        swatch.style.backgroundColor = this.value;
                    });
                }
            });
            </script>
            </div>
<div class="help-text">Main brand color</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="color_themes[0].secondary_color">Secondary Color</label>
<div class="color-input-group"><input name="color_themes[0].secondary_color" id="color_themes[0].secondary_color" value="#2ecc71" type="color" />
            <div class="color-value-display" style="display: inline-flex; align-items: center; margin-left: 10px;">
                <span id="color_themes[0].secondary_color_value" style="font-family: monospace;">#2ecc71</span>
                <div id="color_themes[0].secondary_color_swatch" style="width: 20px; height: 20px; background-color: #2ecc71; border: 1px solid #ccc; margin-left: 5px;"></div>
            </div>
            <script>
            document.addEventListener('DOMContentLoaded', function() {
                const colorInput = document.getElementById('color_themes[0].secondary_color');
                const valueSpan = document.getElementById('color_themes[0].secondary_color_value');
                const swatch = document.getElementById('color_themes[0].secondary_color_swatch');

                if (colorInput && valueSpan && swatch) {
                    colorInput.addEventListener('input', function() {
                        valueSpan.textContent = this.value;
                        swatch.style.backgroundColor = this.value;
                    });
                }
            });
            </script>
            </div>
<div class="help-text">Secondary accent color</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="color_themes[0].accent_color">Accent Color</label>
<div class="color-input-group"><input name="color_themes[0].accent_color" id="color_themes[0].accent_color" value="#e74c3c" type="color" />
            <div class="color-value-display" style="display: inline-flex; align-items: center; margin-left: 10px;">
                <span id="color_themes[0].accent_color_value" style="font-family: monospace;">#e74c3c</span>
                <div id="color_themes[0].accent_color_swatch" style="width: 20px; height: 20px; background-color: #e74c3c; border: 1px solid #ccc; margin-left: 5px;"></div>
            </div>
            <script>
            document.addEventListener('DOMContentLoaded', function() {
                const colorInput = document.getElementById('color_themes[0].accent_color');
                const valueSpan = document.getElementById('color_themes[0].accent_color_value');
                const swatch = document.getElementById('color_themes[0].accent_color_swatch');

                if (colorInput && valueSpan && swatch) {
                    colorInput.addEventListener('input', function() {
                        valueSpan.textContent = this.value;
                        swatch.style.backgroundColor = this.value;
                    });
                }
            });
            </script>
            </div>
<div class="help-text">Highlight color</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="color_themes[0].background_color">Background Color</label>
<div class="color-input-group"><input name="color_themes[0].background_color" id="color_themes[0].background_color" value="#ffffff" type="color" />
            <div class="color-value-display" style="display: inline-flex; align-items: center; margin-left: 10px;">
                <span id="color_themes[0].background_color_value" style="font-family: monospace;">#ffffff</span>
                <div id="color_themes[0].background_color_swatch" style="width: 20px; height: 20px; background-color: #ffffff; border: 1px solid #ccc; margin-left: 5px;"></div>
            </div>
            <script>
            document.addEventListener('DOMContentLoaded', function() {
                const colorInput = document.getElementById('color_themes[0].background_color');
                const valueSpan = document.getElementById('color_themes[0].background_color_value');
                const swatch = document.getElementById('color_themes[0].background_color_swatch');

                if (colorInput && valueSpan && swatch) {
                    colorInput.addEventListener('input', function() {
                        valueSpan.textContent = this.value;
                        swatch.style.backgroundColor = this.value;
                    });
                }
            });
            </script>
            </div>
<div class="help-text">Page background color</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="color_themes[0].text_color">Text Color</label>
<div class="color-input-group"><input name="color_themes[0].text_color" id="color_themes[0].text_color" value="#2c3e50" type="color" />
            <div class="color-value-display" style="display: inline-flex; align-items: center; margin-left: 10px;">
                <span id="color_themes[0].text_color_value" style="font-family: monospace;">#2c3e50</span>
                <div id="color_themes[0].text_color_swatch" style="width: 20px; height: 20px; background-color: #2c3e50; border: 1px solid #ccc; margin-left: 5px;"></div>
            </div>
            <script>
            document.addEventListener('DOMContentLoaded', function() {
                const colorInput = document.getElementById('color_themes[0].text_color');
                const valueSpan = document.getElementById('color_themes[0].text_color_value');
                const swatch = document.getElementById('color_themes[0].text_color_swatch');

                if (colorInput && valueSpan && swatch) {
                    colorInput.addEventListener('input', function() {
                        valueSpan.textContent = this.value;
                        swatch.style.backgroundColor = this.value;
                    });
                }
            });
            </script>
            </div>
<div class="help-text">Primary text color</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="color_themes[0].is_default">Set as Default</label>
<input name="color_themes[0].is_default" id="color_themes[0].is_default" checked="checked" value="1" type="checkbox" />
<div class="help-text">Use this as the default theme?</div></div>
                </div></div>
                </div>
            </div>
        </div>
        <div class="model-list-item card border mb-3"
             data-index="1"
             data-title-template="🎨 {theme_name}"
             data-field-name="color_themes">
            <div class="card-header d-flex justify-content-between align-items-center">
                <h6 class="mb-0">
                    <button class="btn btn-link text-decoration-none p-0 text-start"
                            type="button"
                            data-bs-toggle="collapse"
                            data-bs-target="#color_themes_item_1_content"
                            aria-expanded="true"
                            aria-controls="color_themes_item_1_content">
                        <i class="bi bi-chevron-down me-2"></i>
                        <i class="bi bi-card-list me-2"></i>
                        🎨 Dark Mode
                    </button>
                </h6>
                <button type="button"
                        class="btn btn-outline-danger btn-sm remove-item-btn"
                        data-index="1"
                        data-field-name="color_themes"
                        title="Remove this item">
                    <i class="bi bi-trash"></i>
                </button>
            </div>
            <div class="collapse  show" id="color_themes_item_1_content">
                <div class="card-body"><div class="row">
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="color_themes[1].theme_name">Theme Name</label>
<input name="color_themes[1].theme_name" id="color_themes[1].theme_name" value="Dark Mode" maxlength="50" placeholder="Ocean Blue" type="text" />
<div class="help-text">Name for this color theme</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="color_themes[1].primary_color">Primary Color</label>
<div class="color-input-group"><input name="color_themes[1].primary_color" id="color_themes[1].primary_color" value="#1a1a1a" type="color" />
            <div class="color-value-display" style="display: inline-flex; align-items: center; margin-left: 10px;">
                <span id="color_themes[1].primary_color_value" style="font-family: monospace;">#1a1a1a</span>
                <div id="color_themes[1].primary_color_swatch" style="width: 20px; height: 20px; background-color: #1a1a1a; border: 1px solid #ccc; margin-left: 5px;"></div>
            </div>
            <script>
            document.addEventListener('DOMContentLoaded', function() {
                const colorInput = document.getElementById('color_themes[1].primary_color');
                const valueSpan = document.getElementById('color_themes[1].primary_color_value');
                const swatch = document.getElementById('color_themes[1].primary_color_swatch');

                if (colorInput && valueSpan && swatch) {
                    colorInput.addEventListener('input', function() {
                        valueSpan.textContent = this.value;
                        swatch.style.backgroundColor = this.value;
                    });
                }
            });
            </script>
            </div>
<div class="help-text">Main brand color</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="color_themes[1].secondary_color">Secondary Color</label>
<div class="color-input-group"><input name="color_themes[1].secondary_color" id="color_themes[1].secondary_color" value="#34495e" type="color" />
            <div class="color-value-display" style="display: inline-flex; align-items: center; margin-left: 10px;">
                <span id="color_themes[1].secondary_color_value" style="font-family: monospace;">#34495e</span>
                <div id="color_themes[1].secondary_color_swatch" style="width: 20px; height: 20px; background-color: #34495e; border: 1px solid #ccc; margin-left: 5px;"></div>
            </div>
            <script>
            document.addEventListener('DOMContentLoaded', function() {
                const colorInput = document.getElementById('color_themes[1].secondary_color');
                const valueSpan = document.getElementById('color_themes[1].secondary_color_value');
                const swatch = document.getElementById('color_themes[1].secondary_color_swatch');

                if (colorInput && valueSpan && swatch) {
                    colorInput.addEventListener('input', function() {
                        valueSpan.textContent = this.value;
                        swatch.style.backgroundColor = this.value;
                    });
                }
            });
            </script>
            </div>
<div class="help-text">Secondary accent color</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="color_themes[1].accent_color">Accent Color</label>
<div class="color-input-group"><input name="color_themes[1].accent_color" id="color_themes[1].accent_color" value="#f39c12" type="color" />
            <div class="color-value-display" style="display: inline-flex; align-items: center; margin-left: 10px;">
                <span id="color_themes[1].accent_color_value" style="font-family: monospace;">#f39c12</span>
                <div id="color_themes[1].accent_color_swatch" style="width: 20px; height: 20px; background-color: #f39c12; border: 1px solid #ccc; margin-left: 5px;"></div>
            </div>
            <script>
            document.addEventListener('DOMContentLoaded', function() {
                const colorInput = document.getElementById('color_themes[1].accent_color');
                const valueSpan = document.getElementById('color_themes[1].accent_color_value');
                const swatch = document.getElementById('color_themes[1].accent_color_swatch');

                if (colorInput && valueSpan && swatch) {
                    colorInput.addEventListener('input', function() {
                        valueSpan.textContent = this.value;
                        swatch.style.backgroundColor = this.value;
                    });
                }
            });
            </script>
            </div>
<div class="help-text">Highlight color</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="color_themes[1].background_color">Background Color</label>
<div class="color-input-group"><input name="color_themes[1].background_color" id="color_themes[1].background_color" value="#0a0a0a" type="color" />
            <div class="color-value-display" style="display: inline-flex; align-items: center; margin-left: 10px;">
                <span id="color_themes[1].background_color_value" style="font-family: monospace;">#0a0a0a</span>
                <div id="color_themes[1].background_color_swatch" style="width: 20px; height: 20px; background-color: #0a0a0a; border: 1px solid #ccc; margin-left: 5px;"></div>
            </div>
            <script>
            document.addEventListener('DOMContentLoaded', function() {
                const colorInput = document.getElementById('color_themes[1].background_color');
                const valueSpan = document.getElementById('color_themes[1].background_color_value');
                const swatch = document.getElementById('color_themes[1].background_color_swatch');

                if (colorInput && valueSpan && swatch) {
                    colorInput.addEventListener('input', function() {
                        valueSpan.textContent = this.value;
                        swatch.style.backgroundColor = this.value;
                    });
                }
            });
            </script>
            </div>
<div class="help-text">Page background color</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="color_themes[1].text_color">Text Color</label>
<div class="color-input-group"><input name="color_themes[1].text_color" id="color_themes[1].text_color" value="#ecf0f1" type="color" />
            <div class="color-value-display" style="display: inline-flex; align-items: center; margin-left: 10px;">
                <span id="color_themes[1].text_color_value" style="font-family: monospace;">#ecf0f1</span>
                <div id="color_themes[1].text_color_swatch" style="width: 20px; height: 20px; background-color: #ecf0f1; border: 1px solid #ccc; margin-left: 5px;"></div>
            </div>
            <script>
            document.addEventListener('DOMContentLoaded', function() {
                const colorInput = document.getElementById('color_themes[1].text_color');
                const valueSpan = document.getElementById('color_themes[1].text_color_value');
                const swatch = document.getElementById('color_themes[1].text_color_swatch');

                if (colorInput && valueSpan && swatch) {
                    colorInput.addEventListener('input', function() {
                        valueSpan.textContent = this.value;
                        swatch.style.backgroundColor = this.value;
                    });
                }
            });
            </script>
            </div>
<div class="help-text">Primary text color</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="color_themes[1].is_default">Set as Default</label>
<input name="color_themes[1].is_default" id="color_themes[1].is_default" value="1" type="checkbox" />
<div class="help-text">Use this as the default theme?</div></div>
                </div></div>
                </div>
            </div>
        </div></div>
    <button type="button" class="add-item-btn" data-target="color_themes">Add Item</button>
    
<div class="model-list-help">Create custom color themes</div>

    
</div>

<div class="field"><label for="max_upload_size_mb">Max Upload Size (MB)</label>
<input name="max_upload_size_mb" id="max_upload_size_mb" value="25" min="1" max="5" step="1" type="range" />
        <div class="star-rating" id="max_upload_size_mb-stars">
            β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…
        </div>
        <script>
        document.addEventListener('DOMContentLoaded', function() {
            const range = document.getElementById('max_upload_size_mb');
            const stars = document.getElementById('max_upload_size_mb-stars');
            if (range && stars) {
                range.addEventListener('input', function() {
                    const value = parseInt(this.value);
                    const maxRating = 5;
                    stars.textContent = 'β˜…'.repeat(value) + 'β˜†'.repeat(maxRating - value);
                });
            }
        });
        </script>
        
<div class="help-text">Maximum file size for uploads</div></div></div>
</div>


<div id="tab-3"
     class="tab-panel"
     role="tabpanel"
     style="display: none;"
     aria-hidden="true">
    <div class="vertical-layout vertical-layout" style="display: flex; flex-direction: column; gap: 1rem; align-items: stretch"><div class="field"><label for="company_name">Company Name *</label>
<input name="company_name" id="company_name" value="TechCorp International" required="required" minlength="2" maxlength="200" placeholder="Enter company name" type="text" />
<div class="help-text">Legal name of the company</div></div>
<div class="field"><label for="company_code">Company Code *</label>
<input name="company_code" id="company_code" value="TECH-2024" required="required" minlength="2" maxlength="50" placeholder="e.g., ACME-2024" type="text" />
<div class="help-text">Unique identifier for this company</div></div>
<div class="field"><label for="headquarters_address">Headquarters Address *</label>
<textarea name="headquarters_address" id="headquarters_address" required="required" maxlength="500" placeholder="Full address of headquarters">123 Innovation Drive, San Francisco, CA 94105</textarea>
<div class="help-text">Main office address</div></div>
<div class="field"><label for="ceo_name">CEO Name *</label>
<input name="ceo_name" id="ceo_name" value="Jane Smith" required="required" maxlength="100" placeholder="Name of the CEO" type="text" />
<div class="help-text">Chief Executive Officer</div></div>
<div class="field"><label for="ceo_email">CEO Email *</label>
<input name="ceo_email" id="ceo_email" value="jane.smith@techcorp.com" required="required" placeholder="ceo@company.com" inputmode="email" type="email" />
<div class="help-text">Email address of the CEO</div></div>
<div class="field"><label for="founded_date">Founded Date *</label>
<div class="birthdate-input-group"><input name="founded_date" id="founded_date" value="2010-01-15" required="required" max="2026-03-07" min="1876-01-01" type="date" />
            <div class="age-display" id="founded_date_age" style="margin-top: 5px; font-size: 0.9em; color: #666;"></div>
            <script>
            document.addEventListener('DOMContentLoaded', function() {
                const birthdateField = document.getElementById('founded_date');
                const ageDisplay = document.getElementById('founded_date_age');

                function calculateAge() {
                    if (birthdateField.value && ageDisplay) {
                        const birthDate = new Date(birthdateField.value);
                        const today = new Date();
                        let age = today.getFullYear() - birthDate.getFullYear();
                        const monthDiff = today.getMonth() - birthDate.getMonth();

                        if (monthDiff < 0 || (monthDiff === 0 && today.getDate() < birthDate.getDate())) {
                            age--;
                        }

                        ageDisplay.textContent = age >= 0 ? `Age: ${age} years` : '';
                    }
                }

                if (birthdateField) {
                    birthdateField.addEventListener('change', calculateAge);
                    calculateAge(); // Calculate on load if value is set
                }
            });
            </script>
            </div>
<div class="help-text">When was the company founded?</div></div>
<div class="field"><label for="employee_count">Total Employees</label>
<input name="employee_count" id="employee_count" value="5000" min="1" max="1000000" step="0.1" placeholder="50.0%" inputmode="numeric" type="number" />
<div class="help-text">Total number of employees</div></div>
<div class="field"><label for="annual_revenue">Annual Revenue ($)</label>
<input name="annual_revenue" id="annual_revenue" value="500000000.0" min="0" max="100" step="0.1" placeholder="50.0%" inputmode="numeric" type="number" />
<div class="help-text">Company annual revenue in USD</div></div>
<div class="field"><label for="website">Company Website</label>
<input name="website" id="website" value="https://www.techcorp.com" placeholder="https://www.example.com" type="text" />
<div class="help-text">Company website URL</div></div>

<div class="model-list-block" data-field-name="departments" data-min-items="1" data-max-items="500">
    <div class="model-list-items" id="departments-items"><template class="model-list-item-template">
        <div class="model-list-item card border mb-3"
             data-index="0"
             data-title-template="🏒 {name} (Head: {department_head})"
             data-field-name="departments">
            <div class="card-header d-flex justify-content-between align-items-center">
                <h6 class="mb-0">
                    <button class="btn btn-link text-decoration-none p-0 text-start"
                            type="button"
                            data-bs-toggle="collapse"
                            data-bs-target="#departments_item_0_content"
                            aria-expanded="false"
                            aria-controls="departments_item_0_content">
                        <i class="bi bi-chevron-right me-2"></i>
                        <i class="bi bi-card-list me-2"></i>
                        Item #1
                    </button>
                </h6>
                <button type="button"
                        class="btn btn-outline-danger btn-sm remove-item-btn"
                        data-index="0"
                        data-field-name="departments"
                        title="Remove this item">
                    <i class="bi bi-trash"></i>
                </button>
            </div>
            <div class="collapse collapse show" id="departments_item_0_content">
                <div class="card-body"><div class="row">
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].name">Department Name</label>
<input name="departments[0].name" id="departments[0].name" minlength="2" maxlength="100" placeholder="e.g., Engineering, Sales" type="text" />
<div class="help-text">Name of the department</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].description">Department Description</label>
<textarea name="departments[0].description" id="departments[0].description" placeholder="What does this department do?"></textarea>
<div class="help-text">Description of department responsibilities</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].department_head">Department Head</label>
<input name="departments[0].department_head" id="departments[0].department_head" maxlength="100" placeholder="Head of department name" type="text" />
<div class="help-text">Who leads this department?</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].head_email">Department Head Email</label>
<input name="departments[0].head_email" id="departments[0].head_email" placeholder="head@company.com" inputmode="email" type="email" />
<div class="help-text">Contact email for the department head</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].established_date">Established Date</label>
<div class="birthdate-input-group"><input name="departments[0].established_date" id="departments[0].established_date" max="2026-03-07" min="1876-01-01" type="date" />
            <div class="age-display" id="departments[0].established_date_age" style="margin-top: 5px; font-size: 0.9em; color: #666;"></div>
            <script>
            document.addEventListener('DOMContentLoaded', function() {
                const birthdateField = document.getElementById('departments[0].established_date');
                const ageDisplay = document.getElementById('departments[0].established_date_age');

                function calculateAge() {
                    if (birthdateField.value && ageDisplay) {
                        const birthDate = new Date(birthdateField.value);
                        const today = new Date();
                        let age = today.getFullYear() - birthDate.getFullYear();
                        const monthDiff = today.getMonth() - birthDate.getMonth();

                        if (monthDiff < 0 || (monthDiff === 0 && today.getDate() < birthDate.getDate())) {
                            age--;
                        }

                        ageDisplay.textContent = age >= 0 ? `Age: ${age} years` : '';
                    }
                }

                if (birthdateField) {
                    birthdateField.addEventListener('change', calculateAge);
                    calculateAge(); // Calculate on load if value is set
                }
            });
            </script>
            </div>
<div class="help-text">When was this department established?</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].budget">Annual Budget ($)</label>
<input name="departments[0].budget" id="departments[0].budget" min="0" max="100" step="0.1" placeholder="50.0%" inputmode="numeric" type="number" />
<div class="help-text">Department annual budget in USD</div></div>
                </div>
                <div class="col-12">
                    
<div class="model-list-block" data-field-name="departments[0].teams" data-min-items="1" data-max-items="50">
    <div class="model-list-items" id="departments[0].teams-items"><template class="model-list-item-template">
        <div class="model-list-item card border mb-3"
             data-index="0"
             data-title-template="πŸ‘₯ {name} (Lead: {team_lead})"
             data-field-name="departments[0].teams">
            <div class="card-header d-flex justify-content-between align-items-center">
                <h6 class="mb-0">
                    <button class="btn btn-link text-decoration-none p-0 text-start"
                            type="button"
                            data-bs-toggle="collapse"
                            data-bs-target="#departments_0__teams_item_0_content"
                            aria-expanded="false"
                            aria-controls="departments_0__teams_item_0_content">
                        <i class="bi bi-chevron-right me-2"></i>
                        <i class="bi bi-card-list me-2"></i>
                        Item #1
                    </button>
                </h6>
                <button type="button"
                        class="btn btn-outline-danger btn-sm remove-item-btn"
                        data-index="0"
                        data-field-name="departments[0].teams"
                        title="Remove this item">
                    <i class="bi bi-trash"></i>
                </button>
            </div>
            <div class="collapse collapse show" id="departments_0__teams_item_0_content">
                <div class="card-body"><div class="row">
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].teams[0].name">Team Name</label>
<input name="departments[0].teams[0].name" id="departments[0].teams[0].name" minlength="2" maxlength="100" placeholder="e.g., Backend Team" type="text" />
<div class="help-text">Name of the team</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].teams[0].description">Team Description</label>
<textarea name="departments[0].teams[0].description" id="departments[0].teams[0].description" placeholder="What does this team do?"></textarea>
<div class="help-text">Brief description of the team&#x27;s responsibilities</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].teams[0].team_lead">Team Lead Name</label>
<input name="departments[0].teams[0].team_lead" id="departments[0].teams[0].team_lead" maxlength="100" placeholder="Name of the team lead" type="text" />
<div class="help-text">Who leads this team?</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].teams[0].formed_date">Formation Date</label>
<div class="birthdate-input-group"><input name="departments[0].teams[0].formed_date" id="departments[0].teams[0].formed_date" max="2026-03-07" min="1876-01-01" type="date" />
            <div class="age-display" id="departments[0].teams[0].formed_date_age" style="margin-top: 5px; font-size: 0.9em; color: #666;"></div>
            <script>
            document.addEventListener('DOMContentLoaded', function() {
                const birthdateField = document.getElementById('departments[0].teams[0].formed_date');
                const ageDisplay = document.getElementById('departments[0].teams[0].formed_date_age');

                function calculateAge() {
                    if (birthdateField.value && ageDisplay) {
                        const birthDate = new Date(birthdateField.value);
                        const today = new Date();
                        let age = today.getFullYear() - birthDate.getFullYear();
                        const monthDiff = today.getMonth() - birthDate.getMonth();

                        if (monthDiff < 0 || (monthDiff === 0 && today.getDate() < birthDate.getDate())) {
                            age--;
                        }

                        ageDisplay.textContent = age >= 0 ? `Age: ${age} years` : '';
                    }
                }

                if (birthdateField) {
                    birthdateField.addEventListener('change', calculateAge);
                    calculateAge(); // Calculate on load if value is set
                }
            });
            </script>
            </div>
<div class="help-text">When was this team formed?</div></div>
                </div>
                <div class="col-12">
                    
<div class="model-list-block" data-field-name="departments[0].teams[0].members" data-min-items="1" data-max-items="100">
    <div class="model-list-items" id="departments[0].teams[0].members-items"><template class="model-list-item-template">
        <div class="model-list-item card border mb-3"
             data-index="0"
             data-title-template="πŸ‘€ {name} - {role}"
             data-field-name="departments[0].teams[0].members">
            <div class="card-header d-flex justify-content-between align-items-center">
                <h6 class="mb-0">
                    <button class="btn btn-link text-decoration-none p-0 text-start"
                            type="button"
                            data-bs-toggle="collapse"
                            data-bs-target="#departments_0__teams_0__members_item_0_content"
                            aria-expanded="false"
                            aria-controls="departments_0__teams_0__members_item_0_content">
                        <i class="bi bi-chevron-right me-2"></i>
                        <i class="bi bi-card-list me-2"></i>
                        Item #1
                    </button>
                </h6>
                <button type="button"
                        class="btn btn-outline-danger btn-sm remove-item-btn"
                        data-index="0"
                        data-field-name="departments[0].teams[0].members"
                        title="Remove this item">
                    <i class="bi bi-trash"></i>
                </button>
            </div>
            <div class="collapse collapse show" id="departments_0__teams_0__members_item_0_content">
                <div class="card-body"><div class="row">
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].teams[0].members[0].name">Member Name</label>
<input name="departments[0].teams[0].members[0].name" id="departments[0].teams[0].members[0].name" minlength="2" maxlength="100" placeholder="Enter full name" type="text" />
<div class="help-text">Full name of the team member</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].teams[0].members[0].email">Email Address</label>
<input name="departments[0].teams[0].members[0].email" id="departments[0].teams[0].members[0].email" placeholder="member@company.com" inputmode="email" type="email" />
<div class="help-text">Contact email address</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].teams[0].members[0].role">Role</label>
<input name="departments[0].teams[0].members[0].role" id="departments[0].teams[0].members[0].role" maxlength="100" placeholder="e.g., Senior Developer" type="text" />
<div class="help-text">Job title or role</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].teams[0].members[0].hire_date">Hire Date</label>
<div class="birthdate-input-group"><input name="departments[0].teams[0].members[0].hire_date" id="departments[0].teams[0].members[0].hire_date" max="2026-03-07" min="1876-01-01" type="date" />
            <div class="age-display" id="departments[0].teams[0].members[0].hire_date_age" style="margin-top: 5px; font-size: 0.9em; color: #666;"></div>
            <script>
            document.addEventListener('DOMContentLoaded', function() {
                const birthdateField = document.getElementById('departments[0].teams[0].members[0].hire_date');
                const ageDisplay = document.getElementById('departments[0].teams[0].members[0].hire_date_age');

                function calculateAge() {
                    if (birthdateField.value && ageDisplay) {
                        const birthDate = new Date(birthdateField.value);
                        const today = new Date();
                        let age = today.getFullYear() - birthDate.getFullYear();
                        const monthDiff = today.getMonth() - birthDate.getMonth();

                        if (monthDiff < 0 || (monthDiff === 0 && today.getDate() < birthDate.getDate())) {
                            age--;
                        }

                        ageDisplay.textContent = age >= 0 ? `Age: ${age} years` : '';
                    }
                }

                if (birthdateField) {
                    birthdateField.addEventListener('change', calculateAge);
                    calculateAge(); // Calculate on load if value is set
                }
            });
            </script>
            </div>
<div class="help-text">When did this person join?</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].teams[0].members[0].experience_years">Years of Experience</label>
<input name="departments[0].teams[0].members[0].experience_years" id="departments[0].teams[0].members[0].experience_years" min="0" max="70" step="0.1" placeholder="50.0%" inputmode="numeric" type="number" />
<div class="help-text">Total professional experience in years</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].teams[0].members[0].manager">Manager Name</label>
<input name="departments[0].teams[0].members[0].manager" id="departments[0].teams[0].members[0].manager" placeholder="Direct manager name" type="text" />
<div class="help-text">Who supervises this team member?</div></div>
                </div>
                <div class="col-12">
                    
<div class="model-list-block" data-field-name="departments[0].teams[0].members[0].certifications" data-min-items="0" data-max-items="20">
    <div class="model-list-items" id="departments[0].teams[0].members[0].certifications-items"><template class="model-list-item-template">
        <div class="model-list-item card border mb-3"
             data-index="0"
             data-title-template="{name} - {issuer}"
             data-field-name="departments[0].teams[0].members[0].certifications">
            <div class="card-header d-flex justify-content-between align-items-center">
                <h6 class="mb-0">
                    <button class="btn btn-link text-decoration-none p-0 text-start"
                            type="button"
                            data-bs-toggle="collapse"
                            data-bs-target="#departments_0__teams_0__members_0__certifications_item_0_content"
                            aria-expanded="false"
                            aria-controls="departments_0__teams_0__members_0__certifications_item_0_content">
                        <i class="bi bi-chevron-right me-2"></i>
                        <i class="bi bi-card-list me-2"></i>
                        Item #1
                    </button>
                </h6>
                <button type="button"
                        class="btn btn-outline-danger btn-sm remove-item-btn"
                        data-index="0"
                        data-field-name="departments[0].teams[0].members[0].certifications"
                        title="Remove this item">
                    <i class="bi bi-trash"></i>
                </button>
            </div>
            <div class="collapse collapse show" id="departments_0__teams_0__members_0__certifications_item_0_content">
                <div class="card-body"><div class="row">
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].teams[0].members[0].certifications[0].name">Certification Name</label>
<input name="departments[0].teams[0].members[0].certifications[0].name" id="departments[0].teams[0].members[0].certifications[0].name" maxlength="100" placeholder="e.g., AWS Solutions Architect" type="text" />
<div class="help-text">Name of the certification</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].teams[0].members[0].certifications[0].issuer">Issuing Organization</label>
<input name="departments[0].teams[0].members[0].certifications[0].issuer" id="departments[0].teams[0].members[0].certifications[0].issuer" maxlength="100" placeholder="e.g., Amazon Web Services" type="text" />
<div class="help-text">Organization that issued the certification</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].teams[0].members[0].certifications[0].issue_date">Issue Date</label>
<div class="birthdate-input-group"><input name="departments[0].teams[0].members[0].certifications[0].issue_date" id="departments[0].teams[0].members[0].certifications[0].issue_date" max="2026-03-07" min="1876-01-01" type="date" />
            <div class="age-display" id="departments[0].teams[0].members[0].certifications[0].issue_date_age" style="margin-top: 5px; font-size: 0.9em; color: #666;"></div>
            <script>
            document.addEventListener('DOMContentLoaded', function() {
                const birthdateField = document.getElementById('departments[0].teams[0].members[0].certifications[0].issue_date');
                const ageDisplay = document.getElementById('departments[0].teams[0].members[0].certifications[0].issue_date_age');

                function calculateAge() {
                    if (birthdateField.value && ageDisplay) {
                        const birthDate = new Date(birthdateField.value);
                        const today = new Date();
                        let age = today.getFullYear() - birthDate.getFullYear();
                        const monthDiff = today.getMonth() - birthDate.getMonth();

                        if (monthDiff < 0 || (monthDiff === 0 && today.getDate() < birthDate.getDate())) {
                            age--;
                        }

                        ageDisplay.textContent = age >= 0 ? `Age: ${age} years` : '';
                    }
                }

                if (birthdateField) {
                    birthdateField.addEventListener('change', calculateAge);
                    calculateAge(); // Calculate on load if value is set
                }
            });
            </script>
            </div>
<div class="help-text">When was this certification issued?</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].teams[0].members[0].certifications[0].expiry_date">Expiry Date</label>
<div class="birthdate-input-group"><input name="departments[0].teams[0].members[0].certifications[0].expiry_date" id="departments[0].teams[0].members[0].certifications[0].expiry_date" max="2026-03-07" min="1876-01-01" type="date" />
            <div class="age-display" id="departments[0].teams[0].members[0].certifications[0].expiry_date_age" style="margin-top: 5px; font-size: 0.9em; color: #666;"></div>
            <script>
            document.addEventListener('DOMContentLoaded', function() {
                const birthdateField = document.getElementById('departments[0].teams[0].members[0].certifications[0].expiry_date');
                const ageDisplay = document.getElementById('departments[0].teams[0].members[0].certifications[0].expiry_date_age');

                function calculateAge() {
                    if (birthdateField.value && ageDisplay) {
                        const birthDate = new Date(birthdateField.value);
                        const today = new Date();
                        let age = today.getFullYear() - birthDate.getFullYear();
                        const monthDiff = today.getMonth() - birthDate.getMonth();

                        if (monthDiff < 0 || (monthDiff === 0 && today.getDate() < birthDate.getDate())) {
                            age--;
                        }

                        ageDisplay.textContent = age >= 0 ? `Age: ${age} years` : '';
                    }
                }

                if (birthdateField) {
                    birthdateField.addEventListener('change', calculateAge);
                    calculateAge(); // Calculate on load if value is set
                }
            });
            </script>
            </div>
<div class="help-text">When does this certification expire? (Leave empty if no expiry)</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].teams[0].members[0].certifications[0].credential_id">Credential ID</label>
<input name="departments[0].teams[0].members[0].certifications[0].credential_id" id="departments[0].teams[0].members[0].certifications[0].credential_id" placeholder="Optional credential identifier" type="text" />
<div class="help-text">Unique ID for credential verification</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].teams[0].members[0].certifications[0].credential_url">Credential URL</label>
<input name="departments[0].teams[0].members[0].certifications[0].credential_url" id="departments[0].teams[0].members[0].certifications[0].credential_url" placeholder="https://..." type="text" />
<div class="help-text">Link to verify the credential</div></div>
                </div></div>
                </div>
            </div>
        </div></template>
        <div class="model-list-item card border mb-3"
             data-index="0"
             data-title-template="{name} - {issuer}"
             data-field-name="departments[0].teams[0].members[0].certifications">
            <div class="card-header d-flex justify-content-between align-items-center">
                <h6 class="mb-0">
                    <button class="btn btn-link text-decoration-none p-0 text-start"
                            type="button"
                            data-bs-toggle="collapse"
                            data-bs-target="#departments_0__teams_0__members_0__certifications_item_0_content"
                            aria-expanded="false"
                            aria-controls="departments_0__teams_0__members_0__certifications_item_0_content">
                        <i class="bi bi-chevron-right me-2"></i>
                        <i class="bi bi-card-list me-2"></i>
                        Item #1
                    </button>
                </h6>
                <button type="button"
                        class="btn btn-outline-danger btn-sm remove-item-btn"
                        data-index="0"
                        data-field-name="departments[0].teams[0].members[0].certifications"
                        title="Remove this item">
                    <i class="bi bi-trash"></i>
                </button>
            </div>
            <div class="collapse collapse show" id="departments_0__teams_0__members_0__certifications_item_0_content">
                <div class="card-body"><div class="row">
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].teams[0].members[0].certifications[0].name">Certification Name</label>
<input name="departments[0].teams[0].members[0].certifications[0].name" id="departments[0].teams[0].members[0].certifications[0].name" maxlength="100" placeholder="e.g., AWS Solutions Architect" type="text" />
<div class="help-text">Name of the certification</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].teams[0].members[0].certifications[0].issuer">Issuing Organization</label>
<input name="departments[0].teams[0].members[0].certifications[0].issuer" id="departments[0].teams[0].members[0].certifications[0].issuer" maxlength="100" placeholder="e.g., Amazon Web Services" type="text" />
<div class="help-text">Organization that issued the certification</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].teams[0].members[0].certifications[0].issue_date">Issue Date</label>
<div class="birthdate-input-group"><input name="departments[0].teams[0].members[0].certifications[0].issue_date" id="departments[0].teams[0].members[0].certifications[0].issue_date" max="2026-03-07" min="1876-01-01" type="date" />
            <div class="age-display" id="departments[0].teams[0].members[0].certifications[0].issue_date_age" style="margin-top: 5px; font-size: 0.9em; color: #666;"></div>
            <script>
            document.addEventListener('DOMContentLoaded', function() {
                const birthdateField = document.getElementById('departments[0].teams[0].members[0].certifications[0].issue_date');
                const ageDisplay = document.getElementById('departments[0].teams[0].members[0].certifications[0].issue_date_age');

                function calculateAge() {
                    if (birthdateField.value && ageDisplay) {
                        const birthDate = new Date(birthdateField.value);
                        const today = new Date();
                        let age = today.getFullYear() - birthDate.getFullYear();
                        const monthDiff = today.getMonth() - birthDate.getMonth();

                        if (monthDiff < 0 || (monthDiff === 0 && today.getDate() < birthDate.getDate())) {
                            age--;
                        }

                        ageDisplay.textContent = age >= 0 ? `Age: ${age} years` : '';
                    }
                }

                if (birthdateField) {
                    birthdateField.addEventListener('change', calculateAge);
                    calculateAge(); // Calculate on load if value is set
                }
            });
            </script>
            </div>
<div class="help-text">When was this certification issued?</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].teams[0].members[0].certifications[0].expiry_date">Expiry Date</label>
<div class="birthdate-input-group"><input name="departments[0].teams[0].members[0].certifications[0].expiry_date" id="departments[0].teams[0].members[0].certifications[0].expiry_date" max="2026-03-07" min="1876-01-01" type="date" />
            <div class="age-display" id="departments[0].teams[0].members[0].certifications[0].expiry_date_age" style="margin-top: 5px; font-size: 0.9em; color: #666;"></div>
            <script>
            document.addEventListener('DOMContentLoaded', function() {
                const birthdateField = document.getElementById('departments[0].teams[0].members[0].certifications[0].expiry_date');
                const ageDisplay = document.getElementById('departments[0].teams[0].members[0].certifications[0].expiry_date_age');

                function calculateAge() {
                    if (birthdateField.value && ageDisplay) {
                        const birthDate = new Date(birthdateField.value);
                        const today = new Date();
                        let age = today.getFullYear() - birthDate.getFullYear();
                        const monthDiff = today.getMonth() - birthDate.getMonth();

                        if (monthDiff < 0 || (monthDiff === 0 && today.getDate() < birthDate.getDate())) {
                            age--;
                        }

                        ageDisplay.textContent = age >= 0 ? `Age: ${age} years` : '';
                    }
                }

                if (birthdateField) {
                    birthdateField.addEventListener('change', calculateAge);
                    calculateAge(); // Calculate on load if value is set
                }
            });
            </script>
            </div>
<div class="help-text">When does this certification expire? (Leave empty if no expiry)</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].teams[0].members[0].certifications[0].credential_id">Credential ID</label>
<input name="departments[0].teams[0].members[0].certifications[0].credential_id" id="departments[0].teams[0].members[0].certifications[0].credential_id" placeholder="Optional credential identifier" type="text" />
<div class="help-text">Unique ID for credential verification</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].teams[0].members[0].certifications[0].credential_url">Credential URL</label>
<input name="departments[0].teams[0].members[0].certifications[0].credential_url" id="departments[0].teams[0].members[0].certifications[0].credential_url" placeholder="https://..." type="text" />
<div class="help-text">Link to verify the credential</div></div>
                </div></div>
                </div>
            </div>
        </div></div>
    <button type="button" class="add-item-btn" data-target="departments[0].teams[0].members[0].certifications">Add Item</button>
    
<div class="model-list-help">Professional certifications and credentials</div>

    
</div>

                </div></div>
                </div>
            </div>
        </div></template>
        <div class="model-list-item card border mb-3"
             data-index="0"
             data-title-template="πŸ‘€ {name} - {role}"
             data-field-name="departments[0].teams[0].members">
            <div class="card-header d-flex justify-content-between align-items-center">
                <h6 class="mb-0">
                    <button class="btn btn-link text-decoration-none p-0 text-start"
                            type="button"
                            data-bs-toggle="collapse"
                            data-bs-target="#departments_0__teams_0__members_item_0_content"
                            aria-expanded="false"
                            aria-controls="departments_0__teams_0__members_item_0_content">
                        <i class="bi bi-chevron-right me-2"></i>
                        <i class="bi bi-card-list me-2"></i>
                        Item #1
                    </button>
                </h6>
                <button type="button"
                        class="btn btn-outline-danger btn-sm remove-item-btn"
                        data-index="0"
                        data-field-name="departments[0].teams[0].members"
                        title="Remove this item">
                    <i class="bi bi-trash"></i>
                </button>
            </div>
            <div class="collapse collapse show" id="departments_0__teams_0__members_item_0_content">
                <div class="card-body"><div class="row">
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].teams[0].members[0].name">Member Name</label>
<input name="departments[0].teams[0].members[0].name" id="departments[0].teams[0].members[0].name" minlength="2" maxlength="100" placeholder="Enter full name" type="text" />
<div class="help-text">Full name of the team member</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].teams[0].members[0].email">Email Address</label>
<input name="departments[0].teams[0].members[0].email" id="departments[0].teams[0].members[0].email" placeholder="member@company.com" inputmode="email" type="email" />
<div class="help-text">Contact email address</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].teams[0].members[0].role">Role</label>
<input name="departments[0].teams[0].members[0].role" id="departments[0].teams[0].members[0].role" maxlength="100" placeholder="e.g., Senior Developer" type="text" />
<div class="help-text">Job title or role</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].teams[0].members[0].hire_date">Hire Date</label>
<div class="birthdate-input-group"><input name="departments[0].teams[0].members[0].hire_date" id="departments[0].teams[0].members[0].hire_date" max="2026-03-07" min="1876-01-01" type="date" />
            <div class="age-display" id="departments[0].teams[0].members[0].hire_date_age" style="margin-top: 5px; font-size: 0.9em; color: #666;"></div>
            <script>
            document.addEventListener('DOMContentLoaded', function() {
                const birthdateField = document.getElementById('departments[0].teams[0].members[0].hire_date');
                const ageDisplay = document.getElementById('departments[0].teams[0].members[0].hire_date_age');

                function calculateAge() {
                    if (birthdateField.value && ageDisplay) {
                        const birthDate = new Date(birthdateField.value);
                        const today = new Date();
                        let age = today.getFullYear() - birthDate.getFullYear();
                        const monthDiff = today.getMonth() - birthDate.getMonth();

                        if (monthDiff < 0 || (monthDiff === 0 && today.getDate() < birthDate.getDate())) {
                            age--;
                        }

                        ageDisplay.textContent = age >= 0 ? `Age: ${age} years` : '';
                    }
                }

                if (birthdateField) {
                    birthdateField.addEventListener('change', calculateAge);
                    calculateAge(); // Calculate on load if value is set
                }
            });
            </script>
            </div>
<div class="help-text">When did this person join?</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].teams[0].members[0].experience_years">Years of Experience</label>
<input name="departments[0].teams[0].members[0].experience_years" id="departments[0].teams[0].members[0].experience_years" min="0" max="70" step="0.1" placeholder="50.0%" inputmode="numeric" type="number" />
<div class="help-text">Total professional experience in years</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].teams[0].members[0].manager">Manager Name</label>
<input name="departments[0].teams[0].members[0].manager" id="departments[0].teams[0].members[0].manager" placeholder="Direct manager name" type="text" />
<div class="help-text">Who supervises this team member?</div></div>
                </div>
                <div class="col-12">
                    
<div class="model-list-block" data-field-name="departments[0].teams[0].members[0].certifications" data-min-items="0" data-max-items="20">
    <div class="model-list-items" id="departments[0].teams[0].members[0].certifications-items"><template class="model-list-item-template">
        <div class="model-list-item card border mb-3"
             data-index="0"
             data-title-template="{name} - {issuer}"
             data-field-name="departments[0].teams[0].members[0].certifications">
            <div class="card-header d-flex justify-content-between align-items-center">
                <h6 class="mb-0">
                    <button class="btn btn-link text-decoration-none p-0 text-start"
                            type="button"
                            data-bs-toggle="collapse"
                            data-bs-target="#departments_0__teams_0__members_0__certifications_item_0_content"
                            aria-expanded="false"
                            aria-controls="departments_0__teams_0__members_0__certifications_item_0_content">
                        <i class="bi bi-chevron-right me-2"></i>
                        <i class="bi bi-card-list me-2"></i>
                        Item #1
                    </button>
                </h6>
                <button type="button"
                        class="btn btn-outline-danger btn-sm remove-item-btn"
                        data-index="0"
                        data-field-name="departments[0].teams[0].members[0].certifications"
                        title="Remove this item">
                    <i class="bi bi-trash"></i>
                </button>
            </div>
            <div class="collapse collapse show" id="departments_0__teams_0__members_0__certifications_item_0_content">
                <div class="card-body"><div class="row">
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].teams[0].members[0].certifications[0].name">Certification Name</label>
<input name="departments[0].teams[0].members[0].certifications[0].name" id="departments[0].teams[0].members[0].certifications[0].name" maxlength="100" placeholder="e.g., AWS Solutions Architect" type="text" />
<div class="help-text">Name of the certification</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].teams[0].members[0].certifications[0].issuer">Issuing Organization</label>
<input name="departments[0].teams[0].members[0].certifications[0].issuer" id="departments[0].teams[0].members[0].certifications[0].issuer" maxlength="100" placeholder="e.g., Amazon Web Services" type="text" />
<div class="help-text">Organization that issued the certification</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].teams[0].members[0].certifications[0].issue_date">Issue Date</label>
<div class="birthdate-input-group"><input name="departments[0].teams[0].members[0].certifications[0].issue_date" id="departments[0].teams[0].members[0].certifications[0].issue_date" max="2026-03-07" min="1876-01-01" type="date" />
            <div class="age-display" id="departments[0].teams[0].members[0].certifications[0].issue_date_age" style="margin-top: 5px; font-size: 0.9em; color: #666;"></div>
            <script>
            document.addEventListener('DOMContentLoaded', function() {
                const birthdateField = document.getElementById('departments[0].teams[0].members[0].certifications[0].issue_date');
                const ageDisplay = document.getElementById('departments[0].teams[0].members[0].certifications[0].issue_date_age');

                function calculateAge() {
                    if (birthdateField.value && ageDisplay) {
                        const birthDate = new Date(birthdateField.value);
                        const today = new Date();
                        let age = today.getFullYear() - birthDate.getFullYear();
                        const monthDiff = today.getMonth() - birthDate.getMonth();

                        if (monthDiff < 0 || (monthDiff === 0 && today.getDate() < birthDate.getDate())) {
                            age--;
                        }

                        ageDisplay.textContent = age >= 0 ? `Age: ${age} years` : '';
                    }
                }

                if (birthdateField) {
                    birthdateField.addEventListener('change', calculateAge);
                    calculateAge(); // Calculate on load if value is set
                }
            });
            </script>
            </div>
<div class="help-text">When was this certification issued?</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].teams[0].members[0].certifications[0].expiry_date">Expiry Date</label>
<div class="birthdate-input-group"><input name="departments[0].teams[0].members[0].certifications[0].expiry_date" id="departments[0].teams[0].members[0].certifications[0].expiry_date" max="2026-03-07" min="1876-01-01" type="date" />
            <div class="age-display" id="departments[0].teams[0].members[0].certifications[0].expiry_date_age" style="margin-top: 5px; font-size: 0.9em; color: #666;"></div>
            <script>
            document.addEventListener('DOMContentLoaded', function() {
                const birthdateField = document.getElementById('departments[0].teams[0].members[0].certifications[0].expiry_date');
                const ageDisplay = document.getElementById('departments[0].teams[0].members[0].certifications[0].expiry_date_age');

                function calculateAge() {
                    if (birthdateField.value && ageDisplay) {
                        const birthDate = new Date(birthdateField.value);
                        const today = new Date();
                        let age = today.getFullYear() - birthDate.getFullYear();
                        const monthDiff = today.getMonth() - birthDate.getMonth();

                        if (monthDiff < 0 || (monthDiff === 0 && today.getDate() < birthDate.getDate())) {
                            age--;
                        }

                        ageDisplay.textContent = age >= 0 ? `Age: ${age} years` : '';
                    }
                }

                if (birthdateField) {
                    birthdateField.addEventListener('change', calculateAge);
                    calculateAge(); // Calculate on load if value is set
                }
            });
            </script>
            </div>
<div class="help-text">When does this certification expire? (Leave empty if no expiry)</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].teams[0].members[0].certifications[0].credential_id">Credential ID</label>
<input name="departments[0].teams[0].members[0].certifications[0].credential_id" id="departments[0].teams[0].members[0].certifications[0].credential_id" placeholder="Optional credential identifier" type="text" />
<div class="help-text">Unique ID for credential verification</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].teams[0].members[0].certifications[0].credential_url">Credential URL</label>
<input name="departments[0].teams[0].members[0].certifications[0].credential_url" id="departments[0].teams[0].members[0].certifications[0].credential_url" placeholder="https://..." type="text" />
<div class="help-text">Link to verify the credential</div></div>
                </div></div>
                </div>
            </div>
        </div></template>
        <div class="model-list-item card border mb-3"
             data-index="0"
             data-title-template="{name} - {issuer}"
             data-field-name="departments[0].teams[0].members[0].certifications">
            <div class="card-header d-flex justify-content-between align-items-center">
                <h6 class="mb-0">
                    <button class="btn btn-link text-decoration-none p-0 text-start"
                            type="button"
                            data-bs-toggle="collapse"
                            data-bs-target="#departments_0__teams_0__members_0__certifications_item_0_content"
                            aria-expanded="false"
                            aria-controls="departments_0__teams_0__members_0__certifications_item_0_content">
                        <i class="bi bi-chevron-right me-2"></i>
                        <i class="bi bi-card-list me-2"></i>
                        Item #1
                    </button>
                </h6>
                <button type="button"
                        class="btn btn-outline-danger btn-sm remove-item-btn"
                        data-index="0"
                        data-field-name="departments[0].teams[0].members[0].certifications"
                        title="Remove this item">
                    <i class="bi bi-trash"></i>
                </button>
            </div>
            <div class="collapse collapse show" id="departments_0__teams_0__members_0__certifications_item_0_content">
                <div class="card-body"><div class="row">
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].teams[0].members[0].certifications[0].name">Certification Name</label>
<input name="departments[0].teams[0].members[0].certifications[0].name" id="departments[0].teams[0].members[0].certifications[0].name" maxlength="100" placeholder="e.g., AWS Solutions Architect" type="text" />
<div class="help-text">Name of the certification</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].teams[0].members[0].certifications[0].issuer">Issuing Organization</label>
<input name="departments[0].teams[0].members[0].certifications[0].issuer" id="departments[0].teams[0].members[0].certifications[0].issuer" maxlength="100" placeholder="e.g., Amazon Web Services" type="text" />
<div class="help-text">Organization that issued the certification</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].teams[0].members[0].certifications[0].issue_date">Issue Date</label>
<div class="birthdate-input-group"><input name="departments[0].teams[0].members[0].certifications[0].issue_date" id="departments[0].teams[0].members[0].certifications[0].issue_date" max="2026-03-07" min="1876-01-01" type="date" />
            <div class="age-display" id="departments[0].teams[0].members[0].certifications[0].issue_date_age" style="margin-top: 5px; font-size: 0.9em; color: #666;"></div>
            <script>
            document.addEventListener('DOMContentLoaded', function() {
                const birthdateField = document.getElementById('departments[0].teams[0].members[0].certifications[0].issue_date');
                const ageDisplay = document.getElementById('departments[0].teams[0].members[0].certifications[0].issue_date_age');

                function calculateAge() {
                    if (birthdateField.value && ageDisplay) {
                        const birthDate = new Date(birthdateField.value);
                        const today = new Date();
                        let age = today.getFullYear() - birthDate.getFullYear();
                        const monthDiff = today.getMonth() - birthDate.getMonth();

                        if (monthDiff < 0 || (monthDiff === 0 && today.getDate() < birthDate.getDate())) {
                            age--;
                        }

                        ageDisplay.textContent = age >= 0 ? `Age: ${age} years` : '';
                    }
                }

                if (birthdateField) {
                    birthdateField.addEventListener('change', calculateAge);
                    calculateAge(); // Calculate on load if value is set
                }
            });
            </script>
            </div>
<div class="help-text">When was this certification issued?</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].teams[0].members[0].certifications[0].expiry_date">Expiry Date</label>
<div class="birthdate-input-group"><input name="departments[0].teams[0].members[0].certifications[0].expiry_date" id="departments[0].teams[0].members[0].certifications[0].expiry_date" max="2026-03-07" min="1876-01-01" type="date" />
            <div class="age-display" id="departments[0].teams[0].members[0].certifications[0].expiry_date_age" style="margin-top: 5px; font-size: 0.9em; color: #666;"></div>
            <script>
            document.addEventListener('DOMContentLoaded', function() {
                const birthdateField = document.getElementById('departments[0].teams[0].members[0].certifications[0].expiry_date');
                const ageDisplay = document.getElementById('departments[0].teams[0].members[0].certifications[0].expiry_date_age');

                function calculateAge() {
                    if (birthdateField.value && ageDisplay) {
                        const birthDate = new Date(birthdateField.value);
                        const today = new Date();
                        let age = today.getFullYear() - birthDate.getFullYear();
                        const monthDiff = today.getMonth() - birthDate.getMonth();

                        if (monthDiff < 0 || (monthDiff === 0 && today.getDate() < birthDate.getDate())) {
                            age--;
                        }

                        ageDisplay.textContent = age >= 0 ? `Age: ${age} years` : '';
                    }
                }

                if (birthdateField) {
                    birthdateField.addEventListener('change', calculateAge);
                    calculateAge(); // Calculate on load if value is set
                }
            });
            </script>
            </div>
<div class="help-text">When does this certification expire? (Leave empty if no expiry)</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].teams[0].members[0].certifications[0].credential_id">Credential ID</label>
<input name="departments[0].teams[0].members[0].certifications[0].credential_id" id="departments[0].teams[0].members[0].certifications[0].credential_id" placeholder="Optional credential identifier" type="text" />
<div class="help-text">Unique ID for credential verification</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].teams[0].members[0].certifications[0].credential_url">Credential URL</label>
<input name="departments[0].teams[0].members[0].certifications[0].credential_url" id="departments[0].teams[0].members[0].certifications[0].credential_url" placeholder="https://..." type="text" />
<div class="help-text">Link to verify the credential</div></div>
                </div></div>
                </div>
            </div>
        </div></div>
    <button type="button" class="add-item-btn" data-target="departments[0].teams[0].members[0].certifications">Add Item</button>
    
<div class="model-list-help">Professional certifications and credentials</div>

    
</div>

                </div></div>
                </div>
            </div>
        </div></div>
    <button type="button" class="add-item-btn" data-target="departments[0].teams[0].members">Add Item</button>
    
<div class="model-list-help">Add team members and their certifications</div>

    
</div>

                </div></div>
                </div>
            </div>
        </div></template>
        <div class="model-list-item card border mb-3"
             data-index="0"
             data-title-template="πŸ‘₯ {name} (Lead: {team_lead})"
             data-field-name="departments[0].teams">
            <div class="card-header d-flex justify-content-between align-items-center">
                <h6 class="mb-0">
                    <button class="btn btn-link text-decoration-none p-0 text-start"
                            type="button"
                            data-bs-toggle="collapse"
                            data-bs-target="#departments_0__teams_item_0_content"
                            aria-expanded="false"
                            aria-controls="departments_0__teams_item_0_content">
                        <i class="bi bi-chevron-right me-2"></i>
                        <i class="bi bi-card-list me-2"></i>
                        Item #1
                    </button>
                </h6>
                <button type="button"
                        class="btn btn-outline-danger btn-sm remove-item-btn"
                        data-index="0"
                        data-field-name="departments[0].teams"
                        title="Remove this item">
                    <i class="bi bi-trash"></i>
                </button>
            </div>
            <div class="collapse collapse show" id="departments_0__teams_item_0_content">
                <div class="card-body"><div class="row">
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].teams[0].name">Team Name</label>
<input name="departments[0].teams[0].name" id="departments[0].teams[0].name" minlength="2" maxlength="100" placeholder="e.g., Backend Team" type="text" />
<div class="help-text">Name of the team</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].teams[0].description">Team Description</label>
<textarea name="departments[0].teams[0].description" id="departments[0].teams[0].description" placeholder="What does this team do?"></textarea>
<div class="help-text">Brief description of the team&#x27;s responsibilities</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].teams[0].team_lead">Team Lead Name</label>
<input name="departments[0].teams[0].team_lead" id="departments[0].teams[0].team_lead" maxlength="100" placeholder="Name of the team lead" type="text" />
<div class="help-text">Who leads this team?</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].teams[0].formed_date">Formation Date</label>
<div class="birthdate-input-group"><input name="departments[0].teams[0].formed_date" id="departments[0].teams[0].formed_date" max="2026-03-07" min="1876-01-01" type="date" />
            <div class="age-display" id="departments[0].teams[0].formed_date_age" style="margin-top: 5px; font-size: 0.9em; color: #666;"></div>
            <script>
            document.addEventListener('DOMContentLoaded', function() {
                const birthdateField = document.getElementById('departments[0].teams[0].formed_date');
                const ageDisplay = document.getElementById('departments[0].teams[0].formed_date_age');

                function calculateAge() {
                    if (birthdateField.value && ageDisplay) {
                        const birthDate = new Date(birthdateField.value);
                        const today = new Date();
                        let age = today.getFullYear() - birthDate.getFullYear();
                        const monthDiff = today.getMonth() - birthDate.getMonth();

                        if (monthDiff < 0 || (monthDiff === 0 && today.getDate() < birthDate.getDate())) {
                            age--;
                        }

                        ageDisplay.textContent = age >= 0 ? `Age: ${age} years` : '';
                    }
                }

                if (birthdateField) {
                    birthdateField.addEventListener('change', calculateAge);
                    calculateAge(); // Calculate on load if value is set
                }
            });
            </script>
            </div>
<div class="help-text">When was this team formed?</div></div>
                </div>
                <div class="col-12">
                    
<div class="model-list-block" data-field-name="departments[0].teams[0].members" data-min-items="1" data-max-items="100">
    <div class="model-list-items" id="departments[0].teams[0].members-items"><template class="model-list-item-template">
        <div class="model-list-item card border mb-3"
             data-index="0"
             data-title-template="πŸ‘€ {name} - {role}"
             data-field-name="departments[0].teams[0].members">
            <div class="card-header d-flex justify-content-between align-items-center">
                <h6 class="mb-0">
                    <button class="btn btn-link text-decoration-none p-0 text-start"
                            type="button"
                            data-bs-toggle="collapse"
                            data-bs-target="#departments_0__teams_0__members_item_0_content"
                            aria-expanded="false"
                            aria-controls="departments_0__teams_0__members_item_0_content">
                        <i class="bi bi-chevron-right me-2"></i>
                        <i class="bi bi-card-list me-2"></i>
                        Item #1
                    </button>
                </h6>
                <button type="button"
                        class="btn btn-outline-danger btn-sm remove-item-btn"
                        data-index="0"
                        data-field-name="departments[0].teams[0].members"
                        title="Remove this item">
                    <i class="bi bi-trash"></i>
                </button>
            </div>
            <div class="collapse collapse show" id="departments_0__teams_0__members_item_0_content">
                <div class="card-body"><div class="row">
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].teams[0].members[0].name">Member Name</label>
<input name="departments[0].teams[0].members[0].name" id="departments[0].teams[0].members[0].name" minlength="2" maxlength="100" placeholder="Enter full name" type="text" />
<div class="help-text">Full name of the team member</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].teams[0].members[0].email">Email Address</label>
<input name="departments[0].teams[0].members[0].email" id="departments[0].teams[0].members[0].email" placeholder="member@company.com" inputmode="email" type="email" />
<div class="help-text">Contact email address</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].teams[0].members[0].role">Role</label>
<input name="departments[0].teams[0].members[0].role" id="departments[0].teams[0].members[0].role" maxlength="100" placeholder="e.g., Senior Developer" type="text" />
<div class="help-text">Job title or role</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].teams[0].members[0].hire_date">Hire Date</label>
<div class="birthdate-input-group"><input name="departments[0].teams[0].members[0].hire_date" id="departments[0].teams[0].members[0].hire_date" max="2026-03-07" min="1876-01-01" type="date" />
            <div class="age-display" id="departments[0].teams[0].members[0].hire_date_age" style="margin-top: 5px; font-size: 0.9em; color: #666;"></div>
            <script>
            document.addEventListener('DOMContentLoaded', function() {
                const birthdateField = document.getElementById('departments[0].teams[0].members[0].hire_date');
                const ageDisplay = document.getElementById('departments[0].teams[0].members[0].hire_date_age');

                function calculateAge() {
                    if (birthdateField.value && ageDisplay) {
                        const birthDate = new Date(birthdateField.value);
                        const today = new Date();
                        let age = today.getFullYear() - birthDate.getFullYear();
                        const monthDiff = today.getMonth() - birthDate.getMonth();

                        if (monthDiff < 0 || (monthDiff === 0 && today.getDate() < birthDate.getDate())) {
                            age--;
                        }

                        ageDisplay.textContent = age >= 0 ? `Age: ${age} years` : '';
                    }
                }

                if (birthdateField) {
                    birthdateField.addEventListener('change', calculateAge);
                    calculateAge(); // Calculate on load if value is set
                }
            });
            </script>
            </div>
<div class="help-text">When did this person join?</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].teams[0].members[0].experience_years">Years of Experience</label>
<input name="departments[0].teams[0].members[0].experience_years" id="departments[0].teams[0].members[0].experience_years" min="0" max="70" step="0.1" placeholder="50.0%" inputmode="numeric" type="number" />
<div class="help-text">Total professional experience in years</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].teams[0].members[0].manager">Manager Name</label>
<input name="departments[0].teams[0].members[0].manager" id="departments[0].teams[0].members[0].manager" placeholder="Direct manager name" type="text" />
<div class="help-text">Who supervises this team member?</div></div>
                </div>
                <div class="col-12">
                    
<div class="model-list-block" data-field-name="departments[0].teams[0].members[0].certifications" data-min-items="0" data-max-items="20">
    <div class="model-list-items" id="departments[0].teams[0].members[0].certifications-items"><template class="model-list-item-template">
        <div class="model-list-item card border mb-3"
             data-index="0"
             data-title-template="{name} - {issuer}"
             data-field-name="departments[0].teams[0].members[0].certifications">
            <div class="card-header d-flex justify-content-between align-items-center">
                <h6 class="mb-0">
                    <button class="btn btn-link text-decoration-none p-0 text-start"
                            type="button"
                            data-bs-toggle="collapse"
                            data-bs-target="#departments_0__teams_0__members_0__certifications_item_0_content"
                            aria-expanded="false"
                            aria-controls="departments_0__teams_0__members_0__certifications_item_0_content">
                        <i class="bi bi-chevron-right me-2"></i>
                        <i class="bi bi-card-list me-2"></i>
                        Item #1
                    </button>
                </h6>
                <button type="button"
                        class="btn btn-outline-danger btn-sm remove-item-btn"
                        data-index="0"
                        data-field-name="departments[0].teams[0].members[0].certifications"
                        title="Remove this item">
                    <i class="bi bi-trash"></i>
                </button>
            </div>
            <div class="collapse collapse show" id="departments_0__teams_0__members_0__certifications_item_0_content">
                <div class="card-body"><div class="row">
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].teams[0].members[0].certifications[0].name">Certification Name</label>
<input name="departments[0].teams[0].members[0].certifications[0].name" id="departments[0].teams[0].members[0].certifications[0].name" maxlength="100" placeholder="e.g., AWS Solutions Architect" type="text" />
<div class="help-text">Name of the certification</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].teams[0].members[0].certifications[0].issuer">Issuing Organization</label>
<input name="departments[0].teams[0].members[0].certifications[0].issuer" id="departments[0].teams[0].members[0].certifications[0].issuer" maxlength="100" placeholder="e.g., Amazon Web Services" type="text" />
<div class="help-text">Organization that issued the certification</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].teams[0].members[0].certifications[0].issue_date">Issue Date</label>
<div class="birthdate-input-group"><input name="departments[0].teams[0].members[0].certifications[0].issue_date" id="departments[0].teams[0].members[0].certifications[0].issue_date" max="2026-03-07" min="1876-01-01" type="date" />
            <div class="age-display" id="departments[0].teams[0].members[0].certifications[0].issue_date_age" style="margin-top: 5px; font-size: 0.9em; color: #666;"></div>
            <script>
            document.addEventListener('DOMContentLoaded', function() {
                const birthdateField = document.getElementById('departments[0].teams[0].members[0].certifications[0].issue_date');
                const ageDisplay = document.getElementById('departments[0].teams[0].members[0].certifications[0].issue_date_age');

                function calculateAge() {
                    if (birthdateField.value && ageDisplay) {
                        const birthDate = new Date(birthdateField.value);
                        const today = new Date();
                        let age = today.getFullYear() - birthDate.getFullYear();
                        const monthDiff = today.getMonth() - birthDate.getMonth();

                        if (monthDiff < 0 || (monthDiff === 0 && today.getDate() < birthDate.getDate())) {
                            age--;
                        }

                        ageDisplay.textContent = age >= 0 ? `Age: ${age} years` : '';
                    }
                }

                if (birthdateField) {
                    birthdateField.addEventListener('change', calculateAge);
                    calculateAge(); // Calculate on load if value is set
                }
            });
            </script>
            </div>
<div class="help-text">When was this certification issued?</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].teams[0].members[0].certifications[0].expiry_date">Expiry Date</label>
<div class="birthdate-input-group"><input name="departments[0].teams[0].members[0].certifications[0].expiry_date" id="departments[0].teams[0].members[0].certifications[0].expiry_date" max="2026-03-07" min="1876-01-01" type="date" />
            <div class="age-display" id="departments[0].teams[0].members[0].certifications[0].expiry_date_age" style="margin-top: 5px; font-size: 0.9em; color: #666;"></div>
            <script>
            document.addEventListener('DOMContentLoaded', function() {
                const birthdateField = document.getElementById('departments[0].teams[0].members[0].certifications[0].expiry_date');
                const ageDisplay = document.getElementById('departments[0].teams[0].members[0].certifications[0].expiry_date_age');

                function calculateAge() {
                    if (birthdateField.value && ageDisplay) {
                        const birthDate = new Date(birthdateField.value);
                        const today = new Date();
                        let age = today.getFullYear() - birthDate.getFullYear();
                        const monthDiff = today.getMonth() - birthDate.getMonth();

                        if (monthDiff < 0 || (monthDiff === 0 && today.getDate() < birthDate.getDate())) {
                            age--;
                        }

                        ageDisplay.textContent = age >= 0 ? `Age: ${age} years` : '';
                    }
                }

                if (birthdateField) {
                    birthdateField.addEventListener('change', calculateAge);
                    calculateAge(); // Calculate on load if value is set
                }
            });
            </script>
            </div>
<div class="help-text">When does this certification expire? (Leave empty if no expiry)</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].teams[0].members[0].certifications[0].credential_id">Credential ID</label>
<input name="departments[0].teams[0].members[0].certifications[0].credential_id" id="departments[0].teams[0].members[0].certifications[0].credential_id" placeholder="Optional credential identifier" type="text" />
<div class="help-text">Unique ID for credential verification</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].teams[0].members[0].certifications[0].credential_url">Credential URL</label>
<input name="departments[0].teams[0].members[0].certifications[0].credential_url" id="departments[0].teams[0].members[0].certifications[0].credential_url" placeholder="https://..." type="text" />
<div class="help-text">Link to verify the credential</div></div>
                </div></div>
                </div>
            </div>
        </div></template>
        <div class="model-list-item card border mb-3"
             data-index="0"
             data-title-template="{name} - {issuer}"
             data-field-name="departments[0].teams[0].members[0].certifications">
            <div class="card-header d-flex justify-content-between align-items-center">
                <h6 class="mb-0">
                    <button class="btn btn-link text-decoration-none p-0 text-start"
                            type="button"
                            data-bs-toggle="collapse"
                            data-bs-target="#departments_0__teams_0__members_0__certifications_item_0_content"
                            aria-expanded="false"
                            aria-controls="departments_0__teams_0__members_0__certifications_item_0_content">
                        <i class="bi bi-chevron-right me-2"></i>
                        <i class="bi bi-card-list me-2"></i>
                        Item #1
                    </button>
                </h6>
                <button type="button"
                        class="btn btn-outline-danger btn-sm remove-item-btn"
                        data-index="0"
                        data-field-name="departments[0].teams[0].members[0].certifications"
                        title="Remove this item">
                    <i class="bi bi-trash"></i>
                </button>
            </div>
            <div class="collapse collapse show" id="departments_0__teams_0__members_0__certifications_item_0_content">
                <div class="card-body"><div class="row">
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].teams[0].members[0].certifications[0].name">Certification Name</label>
<input name="departments[0].teams[0].members[0].certifications[0].name" id="departments[0].teams[0].members[0].certifications[0].name" maxlength="100" placeholder="e.g., AWS Solutions Architect" type="text" />
<div class="help-text">Name of the certification</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].teams[0].members[0].certifications[0].issuer">Issuing Organization</label>
<input name="departments[0].teams[0].members[0].certifications[0].issuer" id="departments[0].teams[0].members[0].certifications[0].issuer" maxlength="100" placeholder="e.g., Amazon Web Services" type="text" />
<div class="help-text">Organization that issued the certification</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].teams[0].members[0].certifications[0].issue_date">Issue Date</label>
<div class="birthdate-input-group"><input name="departments[0].teams[0].members[0].certifications[0].issue_date" id="departments[0].teams[0].members[0].certifications[0].issue_date" max="2026-03-07" min="1876-01-01" type="date" />
            <div class="age-display" id="departments[0].teams[0].members[0].certifications[0].issue_date_age" style="margin-top: 5px; font-size: 0.9em; color: #666;"></div>
            <script>
            document.addEventListener('DOMContentLoaded', function() {
                const birthdateField = document.getElementById('departments[0].teams[0].members[0].certifications[0].issue_date');
                const ageDisplay = document.getElementById('departments[0].teams[0].members[0].certifications[0].issue_date_age');

                function calculateAge() {
                    if (birthdateField.value && ageDisplay) {
                        const birthDate = new Date(birthdateField.value);
                        const today = new Date();
                        let age = today.getFullYear() - birthDate.getFullYear();
                        const monthDiff = today.getMonth() - birthDate.getMonth();

                        if (monthDiff < 0 || (monthDiff === 0 && today.getDate() < birthDate.getDate())) {
                            age--;
                        }

                        ageDisplay.textContent = age >= 0 ? `Age: ${age} years` : '';
                    }
                }

                if (birthdateField) {
                    birthdateField.addEventListener('change', calculateAge);
                    calculateAge(); // Calculate on load if value is set
                }
            });
            </script>
            </div>
<div class="help-text">When was this certification issued?</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].teams[0].members[0].certifications[0].expiry_date">Expiry Date</label>
<div class="birthdate-input-group"><input name="departments[0].teams[0].members[0].certifications[0].expiry_date" id="departments[0].teams[0].members[0].certifications[0].expiry_date" max="2026-03-07" min="1876-01-01" type="date" />
            <div class="age-display" id="departments[0].teams[0].members[0].certifications[0].expiry_date_age" style="margin-top: 5px; font-size: 0.9em; color: #666;"></div>
            <script>
            document.addEventListener('DOMContentLoaded', function() {
                const birthdateField = document.getElementById('departments[0].teams[0].members[0].certifications[0].expiry_date');
                const ageDisplay = document.getElementById('departments[0].teams[0].members[0].certifications[0].expiry_date_age');

                function calculateAge() {
                    if (birthdateField.value && ageDisplay) {
                        const birthDate = new Date(birthdateField.value);
                        const today = new Date();
                        let age = today.getFullYear() - birthDate.getFullYear();
                        const monthDiff = today.getMonth() - birthDate.getMonth();

                        if (monthDiff < 0 || (monthDiff === 0 && today.getDate() < birthDate.getDate())) {
                            age--;
                        }

                        ageDisplay.textContent = age >= 0 ? `Age: ${age} years` : '';
                    }
                }

                if (birthdateField) {
                    birthdateField.addEventListener('change', calculateAge);
                    calculateAge(); // Calculate on load if value is set
                }
            });
            </script>
            </div>
<div class="help-text">When does this certification expire? (Leave empty if no expiry)</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].teams[0].members[0].certifications[0].credential_id">Credential ID</label>
<input name="departments[0].teams[0].members[0].certifications[0].credential_id" id="departments[0].teams[0].members[0].certifications[0].credential_id" placeholder="Optional credential identifier" type="text" />
<div class="help-text">Unique ID for credential verification</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].teams[0].members[0].certifications[0].credential_url">Credential URL</label>
<input name="departments[0].teams[0].members[0].certifications[0].credential_url" id="departments[0].teams[0].members[0].certifications[0].credential_url" placeholder="https://..." type="text" />
<div class="help-text">Link to verify the credential</div></div>
                </div></div>
                </div>
            </div>
        </div></div>
    <button type="button" class="add-item-btn" data-target="departments[0].teams[0].members[0].certifications">Add Item</button>
    
<div class="model-list-help">Professional certifications and credentials</div>

    
</div>

                </div></div>
                </div>
            </div>
        </div></template>
        <div class="model-list-item card border mb-3"
             data-index="0"
             data-title-template="πŸ‘€ {name} - {role}"
             data-field-name="departments[0].teams[0].members">
            <div class="card-header d-flex justify-content-between align-items-center">
                <h6 class="mb-0">
                    <button class="btn btn-link text-decoration-none p-0 text-start"
                            type="button"
                            data-bs-toggle="collapse"
                            data-bs-target="#departments_0__teams_0__members_item_0_content"
                            aria-expanded="false"
                            aria-controls="departments_0__teams_0__members_item_0_content">
                        <i class="bi bi-chevron-right me-2"></i>
                        <i class="bi bi-card-list me-2"></i>
                        Item #1
                    </button>
                </h6>
                <button type="button"
                        class="btn btn-outline-danger btn-sm remove-item-btn"
                        data-index="0"
                        data-field-name="departments[0].teams[0].members"
                        title="Remove this item">
                    <i class="bi bi-trash"></i>
                </button>
            </div>
            <div class="collapse collapse show" id="departments_0__teams_0__members_item_0_content">
                <div class="card-body"><div class="row">
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].teams[0].members[0].name">Member Name</label>
<input name="departments[0].teams[0].members[0].name" id="departments[0].teams[0].members[0].name" minlength="2" maxlength="100" placeholder="Enter full name" type="text" />
<div class="help-text">Full name of the team member</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].teams[0].members[0].email">Email Address</label>
<input name="departments[0].teams[0].members[0].email" id="departments[0].teams[0].members[0].email" placeholder="member@company.com" inputmode="email" type="email" />
<div class="help-text">Contact email address</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].teams[0].members[0].role">Role</label>
<input name="departments[0].teams[0].members[0].role" id="departments[0].teams[0].members[0].role" maxlength="100" placeholder="e.g., Senior Developer" type="text" />
<div class="help-text">Job title or role</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].teams[0].members[0].hire_date">Hire Date</label>
<div class="birthdate-input-group"><input name="departments[0].teams[0].members[0].hire_date" id="departments[0].teams[0].members[0].hire_date" max="2026-03-07" min="1876-01-01" type="date" />
            <div class="age-display" id="departments[0].teams[0].members[0].hire_date_age" style="margin-top: 5px; font-size: 0.9em; color: #666;"></div>
            <script>
            document.addEventListener('DOMContentLoaded', function() {
                const birthdateField = document.getElementById('departments[0].teams[0].members[0].hire_date');
                const ageDisplay = document.getElementById('departments[0].teams[0].members[0].hire_date_age');

                function calculateAge() {
                    if (birthdateField.value && ageDisplay) {
                        const birthDate = new Date(birthdateField.value);
                        const today = new Date();
                        let age = today.getFullYear() - birthDate.getFullYear();
                        const monthDiff = today.getMonth() - birthDate.getMonth();

                        if (monthDiff < 0 || (monthDiff === 0 && today.getDate() < birthDate.getDate())) {
                            age--;
                        }

                        ageDisplay.textContent = age >= 0 ? `Age: ${age} years` : '';
                    }
                }

                if (birthdateField) {
                    birthdateField.addEventListener('change', calculateAge);
                    calculateAge(); // Calculate on load if value is set
                }
            });
            </script>
            </div>
<div class="help-text">When did this person join?</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].teams[0].members[0].experience_years">Years of Experience</label>
<input name="departments[0].teams[0].members[0].experience_years" id="departments[0].teams[0].members[0].experience_years" min="0" max="70" step="0.1" placeholder="50.0%" inputmode="numeric" type="number" />
<div class="help-text">Total professional experience in years</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].teams[0].members[0].manager">Manager Name</label>
<input name="departments[0].teams[0].members[0].manager" id="departments[0].teams[0].members[0].manager" placeholder="Direct manager name" type="text" />
<div class="help-text">Who supervises this team member?</div></div>
                </div>
                <div class="col-12">
                    
<div class="model-list-block" data-field-name="departments[0].teams[0].members[0].certifications" data-min-items="0" data-max-items="20">
    <div class="model-list-items" id="departments[0].teams[0].members[0].certifications-items"><template class="model-list-item-template">
        <div class="model-list-item card border mb-3"
             data-index="0"
             data-title-template="{name} - {issuer}"
             data-field-name="departments[0].teams[0].members[0].certifications">
            <div class="card-header d-flex justify-content-between align-items-center">
                <h6 class="mb-0">
                    <button class="btn btn-link text-decoration-none p-0 text-start"
                            type="button"
                            data-bs-toggle="collapse"
                            data-bs-target="#departments_0__teams_0__members_0__certifications_item_0_content"
                            aria-expanded="false"
                            aria-controls="departments_0__teams_0__members_0__certifications_item_0_content">
                        <i class="bi bi-chevron-right me-2"></i>
                        <i class="bi bi-card-list me-2"></i>
                        Item #1
                    </button>
                </h6>
                <button type="button"
                        class="btn btn-outline-danger btn-sm remove-item-btn"
                        data-index="0"
                        data-field-name="departments[0].teams[0].members[0].certifications"
                        title="Remove this item">
                    <i class="bi bi-trash"></i>
                </button>
            </div>
            <div class="collapse collapse show" id="departments_0__teams_0__members_0__certifications_item_0_content">
                <div class="card-body"><div class="row">
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].teams[0].members[0].certifications[0].name">Certification Name</label>
<input name="departments[0].teams[0].members[0].certifications[0].name" id="departments[0].teams[0].members[0].certifications[0].name" maxlength="100" placeholder="e.g., AWS Solutions Architect" type="text" />
<div class="help-text">Name of the certification</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].teams[0].members[0].certifications[0].issuer">Issuing Organization</label>
<input name="departments[0].teams[0].members[0].certifications[0].issuer" id="departments[0].teams[0].members[0].certifications[0].issuer" maxlength="100" placeholder="e.g., Amazon Web Services" type="text" />
<div class="help-text">Organization that issued the certification</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].teams[0].members[0].certifications[0].issue_date">Issue Date</label>
<div class="birthdate-input-group"><input name="departments[0].teams[0].members[0].certifications[0].issue_date" id="departments[0].teams[0].members[0].certifications[0].issue_date" max="2026-03-07" min="1876-01-01" type="date" />
            <div class="age-display" id="departments[0].teams[0].members[0].certifications[0].issue_date_age" style="margin-top: 5px; font-size: 0.9em; color: #666;"></div>
            <script>
            document.addEventListener('DOMContentLoaded', function() {
                const birthdateField = document.getElementById('departments[0].teams[0].members[0].certifications[0].issue_date');
                const ageDisplay = document.getElementById('departments[0].teams[0].members[0].certifications[0].issue_date_age');

                function calculateAge() {
                    if (birthdateField.value && ageDisplay) {
                        const birthDate = new Date(birthdateField.value);
                        const today = new Date();
                        let age = today.getFullYear() - birthDate.getFullYear();
                        const monthDiff = today.getMonth() - birthDate.getMonth();

                        if (monthDiff < 0 || (monthDiff === 0 && today.getDate() < birthDate.getDate())) {
                            age--;
                        }

                        ageDisplay.textContent = age >= 0 ? `Age: ${age} years` : '';
                    }
                }

                if (birthdateField) {
                    birthdateField.addEventListener('change', calculateAge);
                    calculateAge(); // Calculate on load if value is set
                }
            });
            </script>
            </div>
<div class="help-text">When was this certification issued?</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].teams[0].members[0].certifications[0].expiry_date">Expiry Date</label>
<div class="birthdate-input-group"><input name="departments[0].teams[0].members[0].certifications[0].expiry_date" id="departments[0].teams[0].members[0].certifications[0].expiry_date" max="2026-03-07" min="1876-01-01" type="date" />
            <div class="age-display" id="departments[0].teams[0].members[0].certifications[0].expiry_date_age" style="margin-top: 5px; font-size: 0.9em; color: #666;"></div>
            <script>
            document.addEventListener('DOMContentLoaded', function() {
                const birthdateField = document.getElementById('departments[0].teams[0].members[0].certifications[0].expiry_date');
                const ageDisplay = document.getElementById('departments[0].teams[0].members[0].certifications[0].expiry_date_age');

                function calculateAge() {
                    if (birthdateField.value && ageDisplay) {
                        const birthDate = new Date(birthdateField.value);
                        const today = new Date();
                        let age = today.getFullYear() - birthDate.getFullYear();
                        const monthDiff = today.getMonth() - birthDate.getMonth();

                        if (monthDiff < 0 || (monthDiff === 0 && today.getDate() < birthDate.getDate())) {
                            age--;
                        }

                        ageDisplay.textContent = age >= 0 ? `Age: ${age} years` : '';
                    }
                }

                if (birthdateField) {
                    birthdateField.addEventListener('change', calculateAge);
                    calculateAge(); // Calculate on load if value is set
                }
            });
            </script>
            </div>
<div class="help-text">When does this certification expire? (Leave empty if no expiry)</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].teams[0].members[0].certifications[0].credential_id">Credential ID</label>
<input name="departments[0].teams[0].members[0].certifications[0].credential_id" id="departments[0].teams[0].members[0].certifications[0].credential_id" placeholder="Optional credential identifier" type="text" />
<div class="help-text">Unique ID for credential verification</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].teams[0].members[0].certifications[0].credential_url">Credential URL</label>
<input name="departments[0].teams[0].members[0].certifications[0].credential_url" id="departments[0].teams[0].members[0].certifications[0].credential_url" placeholder="https://..." type="text" />
<div class="help-text">Link to verify the credential</div></div>
                </div></div>
                </div>
            </div>
        </div></template>
        <div class="model-list-item card border mb-3"
             data-index="0"
             data-title-template="{name} - {issuer}"
             data-field-name="departments[0].teams[0].members[0].certifications">
            <div class="card-header d-flex justify-content-between align-items-center">
                <h6 class="mb-0">
                    <button class="btn btn-link text-decoration-none p-0 text-start"
                            type="button"
                            data-bs-toggle="collapse"
                            data-bs-target="#departments_0__teams_0__members_0__certifications_item_0_content"
                            aria-expanded="false"
                            aria-controls="departments_0__teams_0__members_0__certifications_item_0_content">
                        <i class="bi bi-chevron-right me-2"></i>
                        <i class="bi bi-card-list me-2"></i>
                        Item #1
                    </button>
                </h6>
                <button type="button"
                        class="btn btn-outline-danger btn-sm remove-item-btn"
                        data-index="0"
                        data-field-name="departments[0].teams[0].members[0].certifications"
                        title="Remove this item">
                    <i class="bi bi-trash"></i>
                </button>
            </div>
            <div class="collapse collapse show" id="departments_0__teams_0__members_0__certifications_item_0_content">
                <div class="card-body"><div class="row">
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].teams[0].members[0].certifications[0].name">Certification Name</label>
<input name="departments[0].teams[0].members[0].certifications[0].name" id="departments[0].teams[0].members[0].certifications[0].name" maxlength="100" placeholder="e.g., AWS Solutions Architect" type="text" />
<div class="help-text">Name of the certification</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].teams[0].members[0].certifications[0].issuer">Issuing Organization</label>
<input name="departments[0].teams[0].members[0].certifications[0].issuer" id="departments[0].teams[0].members[0].certifications[0].issuer" maxlength="100" placeholder="e.g., Amazon Web Services" type="text" />
<div class="help-text">Organization that issued the certification</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].teams[0].members[0].certifications[0].issue_date">Issue Date</label>
<div class="birthdate-input-group"><input name="departments[0].teams[0].members[0].certifications[0].issue_date" id="departments[0].teams[0].members[0].certifications[0].issue_date" max="2026-03-07" min="1876-01-01" type="date" />
            <div class="age-display" id="departments[0].teams[0].members[0].certifications[0].issue_date_age" style="margin-top: 5px; font-size: 0.9em; color: #666;"></div>
            <script>
            document.addEventListener('DOMContentLoaded', function() {
                const birthdateField = document.getElementById('departments[0].teams[0].members[0].certifications[0].issue_date');
                const ageDisplay = document.getElementById('departments[0].teams[0].members[0].certifications[0].issue_date_age');

                function calculateAge() {
                    if (birthdateField.value && ageDisplay) {
                        const birthDate = new Date(birthdateField.value);
                        const today = new Date();
                        let age = today.getFullYear() - birthDate.getFullYear();
                        const monthDiff = today.getMonth() - birthDate.getMonth();

                        if (monthDiff < 0 || (monthDiff === 0 && today.getDate() < birthDate.getDate())) {
                            age--;
                        }

                        ageDisplay.textContent = age >= 0 ? `Age: ${age} years` : '';
                    }
                }

                if (birthdateField) {
                    birthdateField.addEventListener('change', calculateAge);
                    calculateAge(); // Calculate on load if value is set
                }
            });
            </script>
            </div>
<div class="help-text">When was this certification issued?</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].teams[0].members[0].certifications[0].expiry_date">Expiry Date</label>
<div class="birthdate-input-group"><input name="departments[0].teams[0].members[0].certifications[0].expiry_date" id="departments[0].teams[0].members[0].certifications[0].expiry_date" max="2026-03-07" min="1876-01-01" type="date" />
            <div class="age-display" id="departments[0].teams[0].members[0].certifications[0].expiry_date_age" style="margin-top: 5px; font-size: 0.9em; color: #666;"></div>
            <script>
            document.addEventListener('DOMContentLoaded', function() {
                const birthdateField = document.getElementById('departments[0].teams[0].members[0].certifications[0].expiry_date');
                const ageDisplay = document.getElementById('departments[0].teams[0].members[0].certifications[0].expiry_date_age');

                function calculateAge() {
                    if (birthdateField.value && ageDisplay) {
                        const birthDate = new Date(birthdateField.value);
                        const today = new Date();
                        let age = today.getFullYear() - birthDate.getFullYear();
                        const monthDiff = today.getMonth() - birthDate.getMonth();

                        if (monthDiff < 0 || (monthDiff === 0 && today.getDate() < birthDate.getDate())) {
                            age--;
                        }

                        ageDisplay.textContent = age >= 0 ? `Age: ${age} years` : '';
                    }
                }

                if (birthdateField) {
                    birthdateField.addEventListener('change', calculateAge);
                    calculateAge(); // Calculate on load if value is set
                }
            });
            </script>
            </div>
<div class="help-text">When does this certification expire? (Leave empty if no expiry)</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].teams[0].members[0].certifications[0].credential_id">Credential ID</label>
<input name="departments[0].teams[0].members[0].certifications[0].credential_id" id="departments[0].teams[0].members[0].certifications[0].credential_id" placeholder="Optional credential identifier" type="text" />
<div class="help-text">Unique ID for credential verification</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].teams[0].members[0].certifications[0].credential_url">Credential URL</label>
<input name="departments[0].teams[0].members[0].certifications[0].credential_url" id="departments[0].teams[0].members[0].certifications[0].credential_url" placeholder="https://..." type="text" />
<div class="help-text">Link to verify the credential</div></div>
                </div></div>
                </div>
            </div>
        </div></div>
    <button type="button" class="add-item-btn" data-target="departments[0].teams[0].members[0].certifications">Add Item</button>
    
<div class="model-list-help">Professional certifications and credentials</div>

    
</div>

                </div></div>
                </div>
            </div>
        </div></div>
    <button type="button" class="add-item-btn" data-target="departments[0].teams[0].members">Add Item</button>
    
<div class="model-list-help">Add team members and their certifications</div>

    
</div>

                </div></div>
                </div>
            </div>
        </div></div>
    <button type="button" class="add-item-btn" data-target="departments[0].teams">Add Item</button>
    
<div class="model-list-help">Teams within this department and their members</div>

    
</div>

                </div>
                <div class="col-12">
                    
<div class="model-list-block" data-field-name="departments[0].projects" data-min-items="0" data-max-items="100">
    <div class="model-list-items" id="departments[0].projects-items"><template class="model-list-item-template">
        <div class="model-list-item card border mb-3"
             data-index="0"
             data-title-template="πŸš€ {name}"
             data-field-name="departments[0].projects">
            <div class="card-header d-flex justify-content-between align-items-center">
                <h6 class="mb-0">
                    <button class="btn btn-link text-decoration-none p-0 text-start"
                            type="button"
                            data-bs-toggle="collapse"
                            data-bs-target="#departments_0__projects_item_0_content"
                            aria-expanded="false"
                            aria-controls="departments_0__projects_item_0_content">
                        <i class="bi bi-chevron-right me-2"></i>
                        <i class="bi bi-card-list me-2"></i>
                        Item #1
                    </button>
                </h6>
                <button type="button"
                        class="btn btn-outline-danger btn-sm remove-item-btn"
                        data-index="0"
                        data-field-name="departments[0].projects"
                        title="Remove this item">
                    <i class="bi bi-trash"></i>
                </button>
            </div>
            <div class="collapse collapse show" id="departments_0__projects_item_0_content">
                <div class="card-body"><div class="row">
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].projects[0].name">Project Name</label>
<input name="departments[0].projects[0].name" id="departments[0].projects[0].name" minlength="3" maxlength="200" placeholder="e.g., Mobile App Redesign" type="text" />
<div class="help-text">Name of the project</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].projects[0].description">Project Description</label>
<textarea name="departments[0].projects[0].description" id="departments[0].projects[0].description" maxlength="2000" placeholder="Detailed description of the project"></textarea>
<div class="help-text">What is this project about?</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><div class="field">
<label for="departments[0].projects[0].status">Project Status</label>
<div class="input-with-icon"><span class="input-icon">flag</span>
<select name="departments[0].projects[0].status" id="departments[0].projects[0].status"><option value="planning">πŸ“‹ Planning</option>
<option value="in_progress">πŸš€ In Progress</option>
<option value="on_hold">⏸️ On Hold</option>
<option value="completed">βœ… Completed</option>
<option value="archived">πŸ“¦ Archived</option></select>
</div>
<div class="help-text">Current project status</div>
</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].projects[0].start_date">Project Start Date</label>
<div class="birthdate-input-group"><input name="departments[0].projects[0].start_date" id="departments[0].projects[0].start_date" max="2026-03-07" min="1876-01-01" type="date" />
            <div class="age-display" id="departments[0].projects[0].start_date_age" style="margin-top: 5px; font-size: 0.9em; color: #666;"></div>
            <script>
            document.addEventListener('DOMContentLoaded', function() {
                const birthdateField = document.getElementById('departments[0].projects[0].start_date');
                const ageDisplay = document.getElementById('departments[0].projects[0].start_date_age');

                function calculateAge() {
                    if (birthdateField.value && ageDisplay) {
                        const birthDate = new Date(birthdateField.value);
                        const today = new Date();
                        let age = today.getFullYear() - birthDate.getFullYear();
                        const monthDiff = today.getMonth() - birthDate.getMonth();

                        if (monthDiff < 0 || (monthDiff === 0 && today.getDate() < birthDate.getDate())) {
                            age--;
                        }

                        ageDisplay.textContent = age >= 0 ? `Age: ${age} years` : '';
                    }
                }

                if (birthdateField) {
                    birthdateField.addEventListener('change', calculateAge);
                    calculateAge(); // Calculate on load if value is set
                }
            });
            </script>
            </div>
<div class="help-text">When does this project start?</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].projects[0].target_end_date">Target End Date</label>
<div class="birthdate-input-group"><input name="departments[0].projects[0].target_end_date" id="departments[0].projects[0].target_end_date" max="2026-03-07" min="1876-01-01" type="date" />
            <div class="age-display" id="departments[0].projects[0].target_end_date_age" style="margin-top: 5px; font-size: 0.9em; color: #666;"></div>
            <script>
            document.addEventListener('DOMContentLoaded', function() {
                const birthdateField = document.getElementById('departments[0].projects[0].target_end_date');
                const ageDisplay = document.getElementById('departments[0].projects[0].target_end_date_age');

                function calculateAge() {
                    if (birthdateField.value && ageDisplay) {
                        const birthDate = new Date(birthdateField.value);
                        const today = new Date();
                        let age = today.getFullYear() - birthDate.getFullYear();
                        const monthDiff = today.getMonth() - birthDate.getMonth();

                        if (monthDiff < 0 || (monthDiff === 0 && today.getDate() < birthDate.getDate())) {
                            age--;
                        }

                        ageDisplay.textContent = age >= 0 ? `Age: ${age} years` : '';
                    }
                }

                if (birthdateField) {
                    birthdateField.addEventListener('change', calculateAge);
                    calculateAge(); // Calculate on load if value is set
                }
            });
            </script>
            </div>
<div class="help-text">When should this project be completed?</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].projects[0].budget">Budget ($)</label>
<input name="departments[0].projects[0].budget" id="departments[0].projects[0].budget" min="0" max="100" step="0.1" placeholder="50.0%" inputmode="numeric" type="number" />
<div class="help-text">Project budget in USD</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].projects[0].project_manager">Project Manager</label>
<input name="departments[0].projects[0].project_manager" id="departments[0].projects[0].project_manager" maxlength="100" placeholder="PM name" type="text" />
<div class="help-text">Who is managing this project?</div></div>
                </div>
                <div class="col-12">
                    
<div class="model-list-block" data-field-name="departments[0].projects[0].tasks" data-min-items="1" data-max-items="200">
    <div class="model-list-items" id="departments[0].projects[0].tasks-items"><template class="model-list-item-template">
        <div class="model-list-item card border mb-3"
             data-index="0"
             data-title-template="πŸ“‹ {title}"
             data-field-name="departments[0].projects[0].tasks">
            <div class="card-header d-flex justify-content-between align-items-center">
                <h6 class="mb-0">
                    <button class="btn btn-link text-decoration-none p-0 text-start"
                            type="button"
                            data-bs-toggle="collapse"
                            data-bs-target="#departments_0__projects_0__tasks_item_0_content"
                            aria-expanded="false"
                            aria-controls="departments_0__projects_0__tasks_item_0_content">
                        <i class="bi bi-chevron-right me-2"></i>
                        <i class="bi bi-card-list me-2"></i>
                        Item #1
                    </button>
                </h6>
                <button type="button"
                        class="btn btn-outline-danger btn-sm remove-item-btn"
                        data-index="0"
                        data-field-name="departments[0].projects[0].tasks"
                        title="Remove this item">
                    <i class="bi bi-trash"></i>
                </button>
            </div>
            <div class="collapse collapse show" id="departments_0__projects_0__tasks_item_0_content">
                <div class="card-body"><div class="row">
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].projects[0].tasks[0].title">Task Title</label>
<input name="departments[0].projects[0].tasks[0].title" id="departments[0].projects[0].tasks[0].title" minlength="3" maxlength="200" placeholder="Brief task name" type="text" />
<div class="help-text">What is this task?</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].projects[0].tasks[0].description">Task Description</label>
<textarea name="departments[0].projects[0].tasks[0].description" id="departments[0].projects[0].tasks[0].description" maxlength="2000" placeholder="Detailed description of the task"></textarea>
<div class="help-text">Full description of what needs to be done</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><div class="field">
<label for="departments[0].projects[0].tasks[0].priority">Priority Level</label>
<div class="input-with-icon"><span class="input-icon">exclamation-circle</span>
<select name="departments[0].projects[0].tasks[0].priority" id="departments[0].projects[0].tasks[0].priority"><option value="low">🟒 Low</option>
<option value="medium">🟑 Medium</option>
<option value="high">πŸ”΄ High</option>
<option value="critical">β›” Critical</option></select>
</div>
<div class="help-text">Task priority level</div>
</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><div class="field">
<label for="departments[0].projects[0].tasks[0].status">Task Status</label>
<select name="departments[0].projects[0].tasks[0].status" id="departments[0].projects[0].tasks[0].status"><option value="planning">πŸ“‹ Planning</option>
<option value="in_progress">πŸ”„ In Progress</option>
<option value="in_review">πŸ‘€ In Review</option>
<option value="completed">βœ… Completed</option>
<option value="cancelled">❌ Cancelled</option></select>
<div class="help-text">Current task status</div>
</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].projects[0].tasks[0].start_date">Start Date</label>
<div class="birthdate-input-group"><input name="departments[0].projects[0].tasks[0].start_date" id="departments[0].projects[0].tasks[0].start_date" max="2026-03-07" min="1876-01-01" type="date" />
            <div class="age-display" id="departments[0].projects[0].tasks[0].start_date_age" style="margin-top: 5px; font-size: 0.9em; color: #666;"></div>
            <script>
            document.addEventListener('DOMContentLoaded', function() {
                const birthdateField = document.getElementById('departments[0].projects[0].tasks[0].start_date');
                const ageDisplay = document.getElementById('departments[0].projects[0].tasks[0].start_date_age');

                function calculateAge() {
                    if (birthdateField.value && ageDisplay) {
                        const birthDate = new Date(birthdateField.value);
                        const today = new Date();
                        let age = today.getFullYear() - birthDate.getFullYear();
                        const monthDiff = today.getMonth() - birthDate.getMonth();

                        if (monthDiff < 0 || (monthDiff === 0 && today.getDate() < birthDate.getDate())) {
                            age--;
                        }

                        ageDisplay.textContent = age >= 0 ? `Age: ${age} years` : '';
                    }
                }

                if (birthdateField) {
                    birthdateField.addEventListener('change', calculateAge);
                    calculateAge(); // Calculate on load if value is set
                }
            });
            </script>
            </div>
<div class="help-text">When should this task start?</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].projects[0].tasks[0].due_date">Due Date</label>
<div class="birthdate-input-group"><input name="departments[0].projects[0].tasks[0].due_date" id="departments[0].projects[0].tasks[0].due_date" max="2026-03-07" min="1876-01-01" type="date" />
            <div class="age-display" id="departments[0].projects[0].tasks[0].due_date_age" style="margin-top: 5px; font-size: 0.9em; color: #666;"></div>
            <script>
            document.addEventListener('DOMContentLoaded', function() {
                const birthdateField = document.getElementById('departments[0].projects[0].tasks[0].due_date');
                const ageDisplay = document.getElementById('departments[0].projects[0].tasks[0].due_date_age');

                function calculateAge() {
                    if (birthdateField.value && ageDisplay) {
                        const birthDate = new Date(birthdateField.value);
                        const today = new Date();
                        let age = today.getFullYear() - birthDate.getFullYear();
                        const monthDiff = today.getMonth() - birthDate.getMonth();

                        if (monthDiff < 0 || (monthDiff === 0 && today.getDate() < birthDate.getDate())) {
                            age--;
                        }

                        ageDisplay.textContent = age >= 0 ? `Age: ${age} years` : '';
                    }
                }

                if (birthdateField) {
                    birthdateField.addEventListener('change', calculateAge);
                    calculateAge(); // Calculate on load if value is set
                }
            });
            </script>
            </div>
<div class="help-text">When is this task due?</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].projects[0].tasks[0].assigned_to">Assigned To</label>
<input name="departments[0].projects[0].tasks[0].assigned_to" id="departments[0].projects[0].tasks[0].assigned_to" placeholder="Team member name" type="text" />
<div class="help-text">Who is responsible for this task?</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].projects[0].tasks[0].estimated_hours">Estimated Hours</label>
<input name="departments[0].projects[0].tasks[0].estimated_hours" id="departments[0].projects[0].tasks[0].estimated_hours" min="0.5" max="1000" step="0.1" placeholder="50.0%" inputmode="numeric" type="number" />
<div class="help-text">Estimated time to complete (in hours)</div></div>
                </div>
                <div class="col-12">
                    
<div class="model-list-block" data-field-name="departments[0].projects[0].tasks[0].subtasks" data-min-items="0" data-max-items="50">
    <div class="model-list-items" id="departments[0].projects[0].tasks[0].subtasks-items"><template class="model-list-item-template">
        <div class="model-list-item card border mb-3"
             data-index="0"
             data-title-template="πŸ”Ή {title}"
             data-field-name="departments[0].projects[0].tasks[0].subtasks">
            <div class="card-header d-flex justify-content-between align-items-center">
                <h6 class="mb-0">
                    <button class="btn btn-link text-decoration-none p-0 text-start"
                            type="button"
                            data-bs-toggle="collapse"
                            data-bs-target="#departments_0__projects_0__tasks_0__subtasks_item_0_content"
                            aria-expanded="false"
                            aria-controls="departments_0__projects_0__tasks_0__subtasks_item_0_content">
                        <i class="bi bi-chevron-right me-2"></i>
                        <i class="bi bi-card-list me-2"></i>
                        Item #1
                    </button>
                </h6>
                <button type="button"
                        class="btn btn-outline-danger btn-sm remove-item-btn"
                        data-index="0"
                        data-field-name="departments[0].projects[0].tasks[0].subtasks"
                        title="Remove this item">
                    <i class="bi bi-trash"></i>
                </button>
            </div>
            <div class="collapse collapse show" id="departments_0__projects_0__tasks_0__subtasks_item_0_content">
                <div class="card-body"><div class="row">
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].projects[0].tasks[0].subtasks[0].title">Subtask Title</label>
<input name="departments[0].projects[0].tasks[0].subtasks[0].title" id="departments[0].projects[0].tasks[0].subtasks[0].title" maxlength="200" placeholder="Brief description of the subtask" type="text" />
<div class="help-text">What is this subtask about?</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].projects[0].tasks[0].subtasks[0].description">Description</label>
<textarea name="departments[0].projects[0].tasks[0].subtasks[0].description" id="departments[0].projects[0].tasks[0].subtasks[0].description" placeholder="Detailed description of the subtask"></textarea>
<div class="help-text">Additional details about this subtask</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].projects[0].tasks[0].subtasks[0].assigned_to">Assigned To</label>
<input name="departments[0].projects[0].tasks[0].subtasks[0].assigned_to" id="departments[0].projects[0].tasks[0].subtasks[0].assigned_to" maxlength="100" placeholder="Team member name" type="text" />
<div class="help-text">Who is responsible for this subtask?</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].projects[0].tasks[0].subtasks[0].estimated_hours">Estimated Hours</label>
<input name="departments[0].projects[0].tasks[0].subtasks[0].estimated_hours" id="departments[0].projects[0].tasks[0].subtasks[0].estimated_hours" min="0.5" max="100" step="0.1" placeholder="50.0%" inputmode="numeric" type="number" />
<div class="help-text">Estimated time to complete</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><div class="field">
<label for="departments[0].projects[0].tasks[0].subtasks[0].status">Status</label>
<select name="departments[0].projects[0].tasks[0].subtasks[0].status" id="departments[0].projects[0].tasks[0].subtasks[0].status"><option value="pending">⏳ Pending</option>
<option value="in_progress">πŸ”„ In Progress</option>
<option value="completed">βœ… Completed</option>
<option value="blocked">🚫 Blocked</option></select>
<div class="help-text">Current status of the subtask</div>
</div></div>
                </div></div>
                </div>
            </div>
        </div></template>
        <div class="model-list-item card border mb-3"
             data-index="0"
             data-title-template="πŸ”Ή {title}"
             data-field-name="departments[0].projects[0].tasks[0].subtasks">
            <div class="card-header d-flex justify-content-between align-items-center">
                <h6 class="mb-0">
                    <button class="btn btn-link text-decoration-none p-0 text-start"
                            type="button"
                            data-bs-toggle="collapse"
                            data-bs-target="#departments_0__projects_0__tasks_0__subtasks_item_0_content"
                            aria-expanded="false"
                            aria-controls="departments_0__projects_0__tasks_0__subtasks_item_0_content">
                        <i class="bi bi-chevron-right me-2"></i>
                        <i class="bi bi-card-list me-2"></i>
                        Item #1
                    </button>
                </h6>
                <button type="button"
                        class="btn btn-outline-danger btn-sm remove-item-btn"
                        data-index="0"
                        data-field-name="departments[0].projects[0].tasks[0].subtasks"
                        title="Remove this item">
                    <i class="bi bi-trash"></i>
                </button>
            </div>
            <div class="collapse collapse show" id="departments_0__projects_0__tasks_0__subtasks_item_0_content">
                <div class="card-body"><div class="row">
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].projects[0].tasks[0].subtasks[0].title">Subtask Title</label>
<input name="departments[0].projects[0].tasks[0].subtasks[0].title" id="departments[0].projects[0].tasks[0].subtasks[0].title" maxlength="200" placeholder="Brief description of the subtask" type="text" />
<div class="help-text">What is this subtask about?</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].projects[0].tasks[0].subtasks[0].description">Description</label>
<textarea name="departments[0].projects[0].tasks[0].subtasks[0].description" id="departments[0].projects[0].tasks[0].subtasks[0].description" placeholder="Detailed description of the subtask"></textarea>
<div class="help-text">Additional details about this subtask</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].projects[0].tasks[0].subtasks[0].assigned_to">Assigned To</label>
<input name="departments[0].projects[0].tasks[0].subtasks[0].assigned_to" id="departments[0].projects[0].tasks[0].subtasks[0].assigned_to" maxlength="100" placeholder="Team member name" type="text" />
<div class="help-text">Who is responsible for this subtask?</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].projects[0].tasks[0].subtasks[0].estimated_hours">Estimated Hours</label>
<input name="departments[0].projects[0].tasks[0].subtasks[0].estimated_hours" id="departments[0].projects[0].tasks[0].subtasks[0].estimated_hours" min="0.5" max="100" step="0.1" placeholder="50.0%" inputmode="numeric" type="number" />
<div class="help-text">Estimated time to complete</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><div class="field">
<label for="departments[0].projects[0].tasks[0].subtasks[0].status">Status</label>
<select name="departments[0].projects[0].tasks[0].subtasks[0].status" id="departments[0].projects[0].tasks[0].subtasks[0].status"><option value="pending">⏳ Pending</option>
<option value="in_progress">πŸ”„ In Progress</option>
<option value="completed">βœ… Completed</option>
<option value="blocked">🚫 Blocked</option></select>
<div class="help-text">Current status of the subtask</div>
</div></div>
                </div></div>
                </div>
            </div>
        </div></div>
    <button type="button" class="add-item-btn" data-target="departments[0].projects[0].tasks[0].subtasks">Add Item</button>
    
<div class="model-list-help">Break down this task into smaller subtasks</div>

    
</div>

                </div></div>
                </div>
            </div>
        </div></template>
        <div class="model-list-item card border mb-3"
             data-index="0"
             data-title-template="πŸ“‹ {title}"
             data-field-name="departments[0].projects[0].tasks">
            <div class="card-header d-flex justify-content-between align-items-center">
                <h6 class="mb-0">
                    <button class="btn btn-link text-decoration-none p-0 text-start"
                            type="button"
                            data-bs-toggle="collapse"
                            data-bs-target="#departments_0__projects_0__tasks_item_0_content"
                            aria-expanded="false"
                            aria-controls="departments_0__projects_0__tasks_item_0_content">
                        <i class="bi bi-chevron-right me-2"></i>
                        <i class="bi bi-card-list me-2"></i>
                        Item #1
                    </button>
                </h6>
                <button type="button"
                        class="btn btn-outline-danger btn-sm remove-item-btn"
                        data-index="0"
                        data-field-name="departments[0].projects[0].tasks"
                        title="Remove this item">
                    <i class="bi bi-trash"></i>
                </button>
            </div>
            <div class="collapse collapse show" id="departments_0__projects_0__tasks_item_0_content">
                <div class="card-body"><div class="row">
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].projects[0].tasks[0].title">Task Title</label>
<input name="departments[0].projects[0].tasks[0].title" id="departments[0].projects[0].tasks[0].title" minlength="3" maxlength="200" placeholder="Brief task name" type="text" />
<div class="help-text">What is this task?</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].projects[0].tasks[0].description">Task Description</label>
<textarea name="departments[0].projects[0].tasks[0].description" id="departments[0].projects[0].tasks[0].description" maxlength="2000" placeholder="Detailed description of the task"></textarea>
<div class="help-text">Full description of what needs to be done</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><div class="field">
<label for="departments[0].projects[0].tasks[0].priority">Priority Level</label>
<div class="input-with-icon"><span class="input-icon">exclamation-circle</span>
<select name="departments[0].projects[0].tasks[0].priority" id="departments[0].projects[0].tasks[0].priority"><option value="low">🟒 Low</option>
<option value="medium">🟑 Medium</option>
<option value="high">πŸ”΄ High</option>
<option value="critical">β›” Critical</option></select>
</div>
<div class="help-text">Task priority level</div>
</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><div class="field">
<label for="departments[0].projects[0].tasks[0].status">Task Status</label>
<select name="departments[0].projects[0].tasks[0].status" id="departments[0].projects[0].tasks[0].status"><option value="planning">πŸ“‹ Planning</option>
<option value="in_progress">πŸ”„ In Progress</option>
<option value="in_review">πŸ‘€ In Review</option>
<option value="completed">βœ… Completed</option>
<option value="cancelled">❌ Cancelled</option></select>
<div class="help-text">Current task status</div>
</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].projects[0].tasks[0].start_date">Start Date</label>
<div class="birthdate-input-group"><input name="departments[0].projects[0].tasks[0].start_date" id="departments[0].projects[0].tasks[0].start_date" max="2026-03-07" min="1876-01-01" type="date" />
            <div class="age-display" id="departments[0].projects[0].tasks[0].start_date_age" style="margin-top: 5px; font-size: 0.9em; color: #666;"></div>
            <script>
            document.addEventListener('DOMContentLoaded', function() {
                const birthdateField = document.getElementById('departments[0].projects[0].tasks[0].start_date');
                const ageDisplay = document.getElementById('departments[0].projects[0].tasks[0].start_date_age');

                function calculateAge() {
                    if (birthdateField.value && ageDisplay) {
                        const birthDate = new Date(birthdateField.value);
                        const today = new Date();
                        let age = today.getFullYear() - birthDate.getFullYear();
                        const monthDiff = today.getMonth() - birthDate.getMonth();

                        if (monthDiff < 0 || (monthDiff === 0 && today.getDate() < birthDate.getDate())) {
                            age--;
                        }

                        ageDisplay.textContent = age >= 0 ? `Age: ${age} years` : '';
                    }
                }

                if (birthdateField) {
                    birthdateField.addEventListener('change', calculateAge);
                    calculateAge(); // Calculate on load if value is set
                }
            });
            </script>
            </div>
<div class="help-text">When should this task start?</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].projects[0].tasks[0].due_date">Due Date</label>
<div class="birthdate-input-group"><input name="departments[0].projects[0].tasks[0].due_date" id="departments[0].projects[0].tasks[0].due_date" max="2026-03-07" min="1876-01-01" type="date" />
            <div class="age-display" id="departments[0].projects[0].tasks[0].due_date_age" style="margin-top: 5px; font-size: 0.9em; color: #666;"></div>
            <script>
            document.addEventListener('DOMContentLoaded', function() {
                const birthdateField = document.getElementById('departments[0].projects[0].tasks[0].due_date');
                const ageDisplay = document.getElementById('departments[0].projects[0].tasks[0].due_date_age');

                function calculateAge() {
                    if (birthdateField.value && ageDisplay) {
                        const birthDate = new Date(birthdateField.value);
                        const today = new Date();
                        let age = today.getFullYear() - birthDate.getFullYear();
                        const monthDiff = today.getMonth() - birthDate.getMonth();

                        if (monthDiff < 0 || (monthDiff === 0 && today.getDate() < birthDate.getDate())) {
                            age--;
                        }

                        ageDisplay.textContent = age >= 0 ? `Age: ${age} years` : '';
                    }
                }

                if (birthdateField) {
                    birthdateField.addEventListener('change', calculateAge);
                    calculateAge(); // Calculate on load if value is set
                }
            });
            </script>
            </div>
<div class="help-text">When is this task due?</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].projects[0].tasks[0].assigned_to">Assigned To</label>
<input name="departments[0].projects[0].tasks[0].assigned_to" id="departments[0].projects[0].tasks[0].assigned_to" placeholder="Team member name" type="text" />
<div class="help-text">Who is responsible for this task?</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].projects[0].tasks[0].estimated_hours">Estimated Hours</label>
<input name="departments[0].projects[0].tasks[0].estimated_hours" id="departments[0].projects[0].tasks[0].estimated_hours" min="0.5" max="1000" step="0.1" placeholder="50.0%" inputmode="numeric" type="number" />
<div class="help-text">Estimated time to complete (in hours)</div></div>
                </div>
                <div class="col-12">
                    
<div class="model-list-block" data-field-name="departments[0].projects[0].tasks[0].subtasks" data-min-items="0" data-max-items="50">
    <div class="model-list-items" id="departments[0].projects[0].tasks[0].subtasks-items"><template class="model-list-item-template">
        <div class="model-list-item card border mb-3"
             data-index="0"
             data-title-template="πŸ”Ή {title}"
             data-field-name="departments[0].projects[0].tasks[0].subtasks">
            <div class="card-header d-flex justify-content-between align-items-center">
                <h6 class="mb-0">
                    <button class="btn btn-link text-decoration-none p-0 text-start"
                            type="button"
                            data-bs-toggle="collapse"
                            data-bs-target="#departments_0__projects_0__tasks_0__subtasks_item_0_content"
                            aria-expanded="false"
                            aria-controls="departments_0__projects_0__tasks_0__subtasks_item_0_content">
                        <i class="bi bi-chevron-right me-2"></i>
                        <i class="bi bi-card-list me-2"></i>
                        Item #1
                    </button>
                </h6>
                <button type="button"
                        class="btn btn-outline-danger btn-sm remove-item-btn"
                        data-index="0"
                        data-field-name="departments[0].projects[0].tasks[0].subtasks"
                        title="Remove this item">
                    <i class="bi bi-trash"></i>
                </button>
            </div>
            <div class="collapse collapse show" id="departments_0__projects_0__tasks_0__subtasks_item_0_content">
                <div class="card-body"><div class="row">
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].projects[0].tasks[0].subtasks[0].title">Subtask Title</label>
<input name="departments[0].projects[0].tasks[0].subtasks[0].title" id="departments[0].projects[0].tasks[0].subtasks[0].title" maxlength="200" placeholder="Brief description of the subtask" type="text" />
<div class="help-text">What is this subtask about?</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].projects[0].tasks[0].subtasks[0].description">Description</label>
<textarea name="departments[0].projects[0].tasks[0].subtasks[0].description" id="departments[0].projects[0].tasks[0].subtasks[0].description" placeholder="Detailed description of the subtask"></textarea>
<div class="help-text">Additional details about this subtask</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].projects[0].tasks[0].subtasks[0].assigned_to">Assigned To</label>
<input name="departments[0].projects[0].tasks[0].subtasks[0].assigned_to" id="departments[0].projects[0].tasks[0].subtasks[0].assigned_to" maxlength="100" placeholder="Team member name" type="text" />
<div class="help-text">Who is responsible for this subtask?</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].projects[0].tasks[0].subtasks[0].estimated_hours">Estimated Hours</label>
<input name="departments[0].projects[0].tasks[0].subtasks[0].estimated_hours" id="departments[0].projects[0].tasks[0].subtasks[0].estimated_hours" min="0.5" max="100" step="0.1" placeholder="50.0%" inputmode="numeric" type="number" />
<div class="help-text">Estimated time to complete</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><div class="field">
<label for="departments[0].projects[0].tasks[0].subtasks[0].status">Status</label>
<select name="departments[0].projects[0].tasks[0].subtasks[0].status" id="departments[0].projects[0].tasks[0].subtasks[0].status"><option value="pending">⏳ Pending</option>
<option value="in_progress">πŸ”„ In Progress</option>
<option value="completed">βœ… Completed</option>
<option value="blocked">🚫 Blocked</option></select>
<div class="help-text">Current status of the subtask</div>
</div></div>
                </div></div>
                </div>
            </div>
        </div></template>
        <div class="model-list-item card border mb-3"
             data-index="0"
             data-title-template="πŸ”Ή {title}"
             data-field-name="departments[0].projects[0].tasks[0].subtasks">
            <div class="card-header d-flex justify-content-between align-items-center">
                <h6 class="mb-0">
                    <button class="btn btn-link text-decoration-none p-0 text-start"
                            type="button"
                            data-bs-toggle="collapse"
                            data-bs-target="#departments_0__projects_0__tasks_0__subtasks_item_0_content"
                            aria-expanded="false"
                            aria-controls="departments_0__projects_0__tasks_0__subtasks_item_0_content">
                        <i class="bi bi-chevron-right me-2"></i>
                        <i class="bi bi-card-list me-2"></i>
                        Item #1
                    </button>
                </h6>
                <button type="button"
                        class="btn btn-outline-danger btn-sm remove-item-btn"
                        data-index="0"
                        data-field-name="departments[0].projects[0].tasks[0].subtasks"
                        title="Remove this item">
                    <i class="bi bi-trash"></i>
                </button>
            </div>
            <div class="collapse collapse show" id="departments_0__projects_0__tasks_0__subtasks_item_0_content">
                <div class="card-body"><div class="row">
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].projects[0].tasks[0].subtasks[0].title">Subtask Title</label>
<input name="departments[0].projects[0].tasks[0].subtasks[0].title" id="departments[0].projects[0].tasks[0].subtasks[0].title" maxlength="200" placeholder="Brief description of the subtask" type="text" />
<div class="help-text">What is this subtask about?</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].projects[0].tasks[0].subtasks[0].description">Description</label>
<textarea name="departments[0].projects[0].tasks[0].subtasks[0].description" id="departments[0].projects[0].tasks[0].subtasks[0].description" placeholder="Detailed description of the subtask"></textarea>
<div class="help-text">Additional details about this subtask</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].projects[0].tasks[0].subtasks[0].assigned_to">Assigned To</label>
<input name="departments[0].projects[0].tasks[0].subtasks[0].assigned_to" id="departments[0].projects[0].tasks[0].subtasks[0].assigned_to" maxlength="100" placeholder="Team member name" type="text" />
<div class="help-text">Who is responsible for this subtask?</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].projects[0].tasks[0].subtasks[0].estimated_hours">Estimated Hours</label>
<input name="departments[0].projects[0].tasks[0].subtasks[0].estimated_hours" id="departments[0].projects[0].tasks[0].subtasks[0].estimated_hours" min="0.5" max="100" step="0.1" placeholder="50.0%" inputmode="numeric" type="number" />
<div class="help-text">Estimated time to complete</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><div class="field">
<label for="departments[0].projects[0].tasks[0].subtasks[0].status">Status</label>
<select name="departments[0].projects[0].tasks[0].subtasks[0].status" id="departments[0].projects[0].tasks[0].subtasks[0].status"><option value="pending">⏳ Pending</option>
<option value="in_progress">πŸ”„ In Progress</option>
<option value="completed">βœ… Completed</option>
<option value="blocked">🚫 Blocked</option></select>
<div class="help-text">Current status of the subtask</div>
</div></div>
                </div></div>
                </div>
            </div>
        </div></div>
    <button type="button" class="add-item-btn" data-target="departments[0].projects[0].tasks[0].subtasks">Add Item</button>
    
<div class="model-list-help">Break down this task into smaller subtasks</div>

    
</div>

                </div></div>
                </div>
            </div>
        </div></div>
    <button type="button" class="add-item-btn" data-target="departments[0].projects[0].tasks">Add Item</button>
    
<div class="model-list-help">Add tasks with subtasks to organize project work</div>

    
</div>

                </div></div>
                </div>
            </div>
        </div></template>
        <div class="model-list-item card border mb-3"
             data-index="0"
             data-title-template="πŸš€ {name}"
             data-field-name="departments[0].projects">
            <div class="card-header d-flex justify-content-between align-items-center">
                <h6 class="mb-0">
                    <button class="btn btn-link text-decoration-none p-0 text-start"
                            type="button"
                            data-bs-toggle="collapse"
                            data-bs-target="#departments_0__projects_item_0_content"
                            aria-expanded="false"
                            aria-controls="departments_0__projects_item_0_content">
                        <i class="bi bi-chevron-right me-2"></i>
                        <i class="bi bi-card-list me-2"></i>
                        Item #1
                    </button>
                </h6>
                <button type="button"
                        class="btn btn-outline-danger btn-sm remove-item-btn"
                        data-index="0"
                        data-field-name="departments[0].projects"
                        title="Remove this item">
                    <i class="bi bi-trash"></i>
                </button>
            </div>
            <div class="collapse collapse show" id="departments_0__projects_item_0_content">
                <div class="card-body"><div class="row">
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].projects[0].name">Project Name</label>
<input name="departments[0].projects[0].name" id="departments[0].projects[0].name" minlength="3" maxlength="200" placeholder="e.g., Mobile App Redesign" type="text" />
<div class="help-text">Name of the project</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].projects[0].description">Project Description</label>
<textarea name="departments[0].projects[0].description" id="departments[0].projects[0].description" maxlength="2000" placeholder="Detailed description of the project"></textarea>
<div class="help-text">What is this project about?</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><div class="field">
<label for="departments[0].projects[0].status">Project Status</label>
<div class="input-with-icon"><span class="input-icon">flag</span>
<select name="departments[0].projects[0].status" id="departments[0].projects[0].status"><option value="planning">πŸ“‹ Planning</option>
<option value="in_progress">πŸš€ In Progress</option>
<option value="on_hold">⏸️ On Hold</option>
<option value="completed">βœ… Completed</option>
<option value="archived">πŸ“¦ Archived</option></select>
</div>
<div class="help-text">Current project status</div>
</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].projects[0].start_date">Project Start Date</label>
<div class="birthdate-input-group"><input name="departments[0].projects[0].start_date" id="departments[0].projects[0].start_date" max="2026-03-07" min="1876-01-01" type="date" />
            <div class="age-display" id="departments[0].projects[0].start_date_age" style="margin-top: 5px; font-size: 0.9em; color: #666;"></div>
            <script>
            document.addEventListener('DOMContentLoaded', function() {
                const birthdateField = document.getElementById('departments[0].projects[0].start_date');
                const ageDisplay = document.getElementById('departments[0].projects[0].start_date_age');

                function calculateAge() {
                    if (birthdateField.value && ageDisplay) {
                        const birthDate = new Date(birthdateField.value);
                        const today = new Date();
                        let age = today.getFullYear() - birthDate.getFullYear();
                        const monthDiff = today.getMonth() - birthDate.getMonth();

                        if (monthDiff < 0 || (monthDiff === 0 && today.getDate() < birthDate.getDate())) {
                            age--;
                        }

                        ageDisplay.textContent = age >= 0 ? `Age: ${age} years` : '';
                    }
                }

                if (birthdateField) {
                    birthdateField.addEventListener('change', calculateAge);
                    calculateAge(); // Calculate on load if value is set
                }
            });
            </script>
            </div>
<div class="help-text">When does this project start?</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].projects[0].target_end_date">Target End Date</label>
<div class="birthdate-input-group"><input name="departments[0].projects[0].target_end_date" id="departments[0].projects[0].target_end_date" max="2026-03-07" min="1876-01-01" type="date" />
            <div class="age-display" id="departments[0].projects[0].target_end_date_age" style="margin-top: 5px; font-size: 0.9em; color: #666;"></div>
            <script>
            document.addEventListener('DOMContentLoaded', function() {
                const birthdateField = document.getElementById('departments[0].projects[0].target_end_date');
                const ageDisplay = document.getElementById('departments[0].projects[0].target_end_date_age');

                function calculateAge() {
                    if (birthdateField.value && ageDisplay) {
                        const birthDate = new Date(birthdateField.value);
                        const today = new Date();
                        let age = today.getFullYear() - birthDate.getFullYear();
                        const monthDiff = today.getMonth() - birthDate.getMonth();

                        if (monthDiff < 0 || (monthDiff === 0 && today.getDate() < birthDate.getDate())) {
                            age--;
                        }

                        ageDisplay.textContent = age >= 0 ? `Age: ${age} years` : '';
                    }
                }

                if (birthdateField) {
                    birthdateField.addEventListener('change', calculateAge);
                    calculateAge(); // Calculate on load if value is set
                }
            });
            </script>
            </div>
<div class="help-text">When should this project be completed?</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].projects[0].budget">Budget ($)</label>
<input name="departments[0].projects[0].budget" id="departments[0].projects[0].budget" min="0" max="100" step="0.1" placeholder="50.0%" inputmode="numeric" type="number" />
<div class="help-text">Project budget in USD</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].projects[0].project_manager">Project Manager</label>
<input name="departments[0].projects[0].project_manager" id="departments[0].projects[0].project_manager" maxlength="100" placeholder="PM name" type="text" />
<div class="help-text">Who is managing this project?</div></div>
                </div>
                <div class="col-12">
                    
<div class="model-list-block" data-field-name="departments[0].projects[0].tasks" data-min-items="1" data-max-items="200">
    <div class="model-list-items" id="departments[0].projects[0].tasks-items"><template class="model-list-item-template">
        <div class="model-list-item card border mb-3"
             data-index="0"
             data-title-template="πŸ“‹ {title}"
             data-field-name="departments[0].projects[0].tasks">
            <div class="card-header d-flex justify-content-between align-items-center">
                <h6 class="mb-0">
                    <button class="btn btn-link text-decoration-none p-0 text-start"
                            type="button"
                            data-bs-toggle="collapse"
                            data-bs-target="#departments_0__projects_0__tasks_item_0_content"
                            aria-expanded="false"
                            aria-controls="departments_0__projects_0__tasks_item_0_content">
                        <i class="bi bi-chevron-right me-2"></i>
                        <i class="bi bi-card-list me-2"></i>
                        Item #1
                    </button>
                </h6>
                <button type="button"
                        class="btn btn-outline-danger btn-sm remove-item-btn"
                        data-index="0"
                        data-field-name="departments[0].projects[0].tasks"
                        title="Remove this item">
                    <i class="bi bi-trash"></i>
                </button>
            </div>
            <div class="collapse collapse show" id="departments_0__projects_0__tasks_item_0_content">
                <div class="card-body"><div class="row">
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].projects[0].tasks[0].title">Task Title</label>
<input name="departments[0].projects[0].tasks[0].title" id="departments[0].projects[0].tasks[0].title" minlength="3" maxlength="200" placeholder="Brief task name" type="text" />
<div class="help-text">What is this task?</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].projects[0].tasks[0].description">Task Description</label>
<textarea name="departments[0].projects[0].tasks[0].description" id="departments[0].projects[0].tasks[0].description" maxlength="2000" placeholder="Detailed description of the task"></textarea>
<div class="help-text">Full description of what needs to be done</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><div class="field">
<label for="departments[0].projects[0].tasks[0].priority">Priority Level</label>
<div class="input-with-icon"><span class="input-icon">exclamation-circle</span>
<select name="departments[0].projects[0].tasks[0].priority" id="departments[0].projects[0].tasks[0].priority"><option value="low">🟒 Low</option>
<option value="medium">🟑 Medium</option>
<option value="high">πŸ”΄ High</option>
<option value="critical">β›” Critical</option></select>
</div>
<div class="help-text">Task priority level</div>
</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><div class="field">
<label for="departments[0].projects[0].tasks[0].status">Task Status</label>
<select name="departments[0].projects[0].tasks[0].status" id="departments[0].projects[0].tasks[0].status"><option value="planning">πŸ“‹ Planning</option>
<option value="in_progress">πŸ”„ In Progress</option>
<option value="in_review">πŸ‘€ In Review</option>
<option value="completed">βœ… Completed</option>
<option value="cancelled">❌ Cancelled</option></select>
<div class="help-text">Current task status</div>
</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].projects[0].tasks[0].start_date">Start Date</label>
<div class="birthdate-input-group"><input name="departments[0].projects[0].tasks[0].start_date" id="departments[0].projects[0].tasks[0].start_date" max="2026-03-07" min="1876-01-01" type="date" />
            <div class="age-display" id="departments[0].projects[0].tasks[0].start_date_age" style="margin-top: 5px; font-size: 0.9em; color: #666;"></div>
            <script>
            document.addEventListener('DOMContentLoaded', function() {
                const birthdateField = document.getElementById('departments[0].projects[0].tasks[0].start_date');
                const ageDisplay = document.getElementById('departments[0].projects[0].tasks[0].start_date_age');

                function calculateAge() {
                    if (birthdateField.value && ageDisplay) {
                        const birthDate = new Date(birthdateField.value);
                        const today = new Date();
                        let age = today.getFullYear() - birthDate.getFullYear();
                        const monthDiff = today.getMonth() - birthDate.getMonth();

                        if (monthDiff < 0 || (monthDiff === 0 && today.getDate() < birthDate.getDate())) {
                            age--;
                        }

                        ageDisplay.textContent = age >= 0 ? `Age: ${age} years` : '';
                    }
                }

                if (birthdateField) {
                    birthdateField.addEventListener('change', calculateAge);
                    calculateAge(); // Calculate on load if value is set
                }
            });
            </script>
            </div>
<div class="help-text">When should this task start?</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].projects[0].tasks[0].due_date">Due Date</label>
<div class="birthdate-input-group"><input name="departments[0].projects[0].tasks[0].due_date" id="departments[0].projects[0].tasks[0].due_date" max="2026-03-07" min="1876-01-01" type="date" />
            <div class="age-display" id="departments[0].projects[0].tasks[0].due_date_age" style="margin-top: 5px; font-size: 0.9em; color: #666;"></div>
            <script>
            document.addEventListener('DOMContentLoaded', function() {
                const birthdateField = document.getElementById('departments[0].projects[0].tasks[0].due_date');
                const ageDisplay = document.getElementById('departments[0].projects[0].tasks[0].due_date_age');

                function calculateAge() {
                    if (birthdateField.value && ageDisplay) {
                        const birthDate = new Date(birthdateField.value);
                        const today = new Date();
                        let age = today.getFullYear() - birthDate.getFullYear();
                        const monthDiff = today.getMonth() - birthDate.getMonth();

                        if (monthDiff < 0 || (monthDiff === 0 && today.getDate() < birthDate.getDate())) {
                            age--;
                        }

                        ageDisplay.textContent = age >= 0 ? `Age: ${age} years` : '';
                    }
                }

                if (birthdateField) {
                    birthdateField.addEventListener('change', calculateAge);
                    calculateAge(); // Calculate on load if value is set
                }
            });
            </script>
            </div>
<div class="help-text">When is this task due?</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].projects[0].tasks[0].assigned_to">Assigned To</label>
<input name="departments[0].projects[0].tasks[0].assigned_to" id="departments[0].projects[0].tasks[0].assigned_to" placeholder="Team member name" type="text" />
<div class="help-text">Who is responsible for this task?</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].projects[0].tasks[0].estimated_hours">Estimated Hours</label>
<input name="departments[0].projects[0].tasks[0].estimated_hours" id="departments[0].projects[0].tasks[0].estimated_hours" min="0.5" max="1000" step="0.1" placeholder="50.0%" inputmode="numeric" type="number" />
<div class="help-text">Estimated time to complete (in hours)</div></div>
                </div>
                <div class="col-12">
                    
<div class="model-list-block" data-field-name="departments[0].projects[0].tasks[0].subtasks" data-min-items="0" data-max-items="50">
    <div class="model-list-items" id="departments[0].projects[0].tasks[0].subtasks-items"><template class="model-list-item-template">
        <div class="model-list-item card border mb-3"
             data-index="0"
             data-title-template="πŸ”Ή {title}"
             data-field-name="departments[0].projects[0].tasks[0].subtasks">
            <div class="card-header d-flex justify-content-between align-items-center">
                <h6 class="mb-0">
                    <button class="btn btn-link text-decoration-none p-0 text-start"
                            type="button"
                            data-bs-toggle="collapse"
                            data-bs-target="#departments_0__projects_0__tasks_0__subtasks_item_0_content"
                            aria-expanded="false"
                            aria-controls="departments_0__projects_0__tasks_0__subtasks_item_0_content">
                        <i class="bi bi-chevron-right me-2"></i>
                        <i class="bi bi-card-list me-2"></i>
                        Item #1
                    </button>
                </h6>
                <button type="button"
                        class="btn btn-outline-danger btn-sm remove-item-btn"
                        data-index="0"
                        data-field-name="departments[0].projects[0].tasks[0].subtasks"
                        title="Remove this item">
                    <i class="bi bi-trash"></i>
                </button>
            </div>
            <div class="collapse collapse show" id="departments_0__projects_0__tasks_0__subtasks_item_0_content">
                <div class="card-body"><div class="row">
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].projects[0].tasks[0].subtasks[0].title">Subtask Title</label>
<input name="departments[0].projects[0].tasks[0].subtasks[0].title" id="departments[0].projects[0].tasks[0].subtasks[0].title" maxlength="200" placeholder="Brief description of the subtask" type="text" />
<div class="help-text">What is this subtask about?</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].projects[0].tasks[0].subtasks[0].description">Description</label>
<textarea name="departments[0].projects[0].tasks[0].subtasks[0].description" id="departments[0].projects[0].tasks[0].subtasks[0].description" placeholder="Detailed description of the subtask"></textarea>
<div class="help-text">Additional details about this subtask</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].projects[0].tasks[0].subtasks[0].assigned_to">Assigned To</label>
<input name="departments[0].projects[0].tasks[0].subtasks[0].assigned_to" id="departments[0].projects[0].tasks[0].subtasks[0].assigned_to" maxlength="100" placeholder="Team member name" type="text" />
<div class="help-text">Who is responsible for this subtask?</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].projects[0].tasks[0].subtasks[0].estimated_hours">Estimated Hours</label>
<input name="departments[0].projects[0].tasks[0].subtasks[0].estimated_hours" id="departments[0].projects[0].tasks[0].subtasks[0].estimated_hours" min="0.5" max="100" step="0.1" placeholder="50.0%" inputmode="numeric" type="number" />
<div class="help-text">Estimated time to complete</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><div class="field">
<label for="departments[0].projects[0].tasks[0].subtasks[0].status">Status</label>
<select name="departments[0].projects[0].tasks[0].subtasks[0].status" id="departments[0].projects[0].tasks[0].subtasks[0].status"><option value="pending">⏳ Pending</option>
<option value="in_progress">πŸ”„ In Progress</option>
<option value="completed">βœ… Completed</option>
<option value="blocked">🚫 Blocked</option></select>
<div class="help-text">Current status of the subtask</div>
</div></div>
                </div></div>
                </div>
            </div>
        </div></template>
        <div class="model-list-item card border mb-3"
             data-index="0"
             data-title-template="πŸ”Ή {title}"
             data-field-name="departments[0].projects[0].tasks[0].subtasks">
            <div class="card-header d-flex justify-content-between align-items-center">
                <h6 class="mb-0">
                    <button class="btn btn-link text-decoration-none p-0 text-start"
                            type="button"
                            data-bs-toggle="collapse"
                            data-bs-target="#departments_0__projects_0__tasks_0__subtasks_item_0_content"
                            aria-expanded="false"
                            aria-controls="departments_0__projects_0__tasks_0__subtasks_item_0_content">
                        <i class="bi bi-chevron-right me-2"></i>
                        <i class="bi bi-card-list me-2"></i>
                        Item #1
                    </button>
                </h6>
                <button type="button"
                        class="btn btn-outline-danger btn-sm remove-item-btn"
                        data-index="0"
                        data-field-name="departments[0].projects[0].tasks[0].subtasks"
                        title="Remove this item">
                    <i class="bi bi-trash"></i>
                </button>
            </div>
            <div class="collapse collapse show" id="departments_0__projects_0__tasks_0__subtasks_item_0_content">
                <div class="card-body"><div class="row">
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].projects[0].tasks[0].subtasks[0].title">Subtask Title</label>
<input name="departments[0].projects[0].tasks[0].subtasks[0].title" id="departments[0].projects[0].tasks[0].subtasks[0].title" maxlength="200" placeholder="Brief description of the subtask" type="text" />
<div class="help-text">What is this subtask about?</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].projects[0].tasks[0].subtasks[0].description">Description</label>
<textarea name="departments[0].projects[0].tasks[0].subtasks[0].description" id="departments[0].projects[0].tasks[0].subtasks[0].description" placeholder="Detailed description of the subtask"></textarea>
<div class="help-text">Additional details about this subtask</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].projects[0].tasks[0].subtasks[0].assigned_to">Assigned To</label>
<input name="departments[0].projects[0].tasks[0].subtasks[0].assigned_to" id="departments[0].projects[0].tasks[0].subtasks[0].assigned_to" maxlength="100" placeholder="Team member name" type="text" />
<div class="help-text">Who is responsible for this subtask?</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].projects[0].tasks[0].subtasks[0].estimated_hours">Estimated Hours</label>
<input name="departments[0].projects[0].tasks[0].subtasks[0].estimated_hours" id="departments[0].projects[0].tasks[0].subtasks[0].estimated_hours" min="0.5" max="100" step="0.1" placeholder="50.0%" inputmode="numeric" type="number" />
<div class="help-text">Estimated time to complete</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><div class="field">
<label for="departments[0].projects[0].tasks[0].subtasks[0].status">Status</label>
<select name="departments[0].projects[0].tasks[0].subtasks[0].status" id="departments[0].projects[0].tasks[0].subtasks[0].status"><option value="pending">⏳ Pending</option>
<option value="in_progress">πŸ”„ In Progress</option>
<option value="completed">βœ… Completed</option>
<option value="blocked">🚫 Blocked</option></select>
<div class="help-text">Current status of the subtask</div>
</div></div>
                </div></div>
                </div>
            </div>
        </div></div>
    <button type="button" class="add-item-btn" data-target="departments[0].projects[0].tasks[0].subtasks">Add Item</button>
    
<div class="model-list-help">Break down this task into smaller subtasks</div>

    
</div>

                </div></div>
                </div>
            </div>
        </div></template>
        <div class="model-list-item card border mb-3"
             data-index="0"
             data-title-template="πŸ“‹ {title}"
             data-field-name="departments[0].projects[0].tasks">
            <div class="card-header d-flex justify-content-between align-items-center">
                <h6 class="mb-0">
                    <button class="btn btn-link text-decoration-none p-0 text-start"
                            type="button"
                            data-bs-toggle="collapse"
                            data-bs-target="#departments_0__projects_0__tasks_item_0_content"
                            aria-expanded="false"
                            aria-controls="departments_0__projects_0__tasks_item_0_content">
                        <i class="bi bi-chevron-right me-2"></i>
                        <i class="bi bi-card-list me-2"></i>
                        Item #1
                    </button>
                </h6>
                <button type="button"
                        class="btn btn-outline-danger btn-sm remove-item-btn"
                        data-index="0"
                        data-field-name="departments[0].projects[0].tasks"
                        title="Remove this item">
                    <i class="bi bi-trash"></i>
                </button>
            </div>
            <div class="collapse collapse show" id="departments_0__projects_0__tasks_item_0_content">
                <div class="card-body"><div class="row">
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].projects[0].tasks[0].title">Task Title</label>
<input name="departments[0].projects[0].tasks[0].title" id="departments[0].projects[0].tasks[0].title" minlength="3" maxlength="200" placeholder="Brief task name" type="text" />
<div class="help-text">What is this task?</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].projects[0].tasks[0].description">Task Description</label>
<textarea name="departments[0].projects[0].tasks[0].description" id="departments[0].projects[0].tasks[0].description" maxlength="2000" placeholder="Detailed description of the task"></textarea>
<div class="help-text">Full description of what needs to be done</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><div class="field">
<label for="departments[0].projects[0].tasks[0].priority">Priority Level</label>
<div class="input-with-icon"><span class="input-icon">exclamation-circle</span>
<select name="departments[0].projects[0].tasks[0].priority" id="departments[0].projects[0].tasks[0].priority"><option value="low">🟒 Low</option>
<option value="medium">🟑 Medium</option>
<option value="high">πŸ”΄ High</option>
<option value="critical">β›” Critical</option></select>
</div>
<div class="help-text">Task priority level</div>
</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><div class="field">
<label for="departments[0].projects[0].tasks[0].status">Task Status</label>
<select name="departments[0].projects[0].tasks[0].status" id="departments[0].projects[0].tasks[0].status"><option value="planning">πŸ“‹ Planning</option>
<option value="in_progress">πŸ”„ In Progress</option>
<option value="in_review">πŸ‘€ In Review</option>
<option value="completed">βœ… Completed</option>
<option value="cancelled">❌ Cancelled</option></select>
<div class="help-text">Current task status</div>
</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].projects[0].tasks[0].start_date">Start Date</label>
<div class="birthdate-input-group"><input name="departments[0].projects[0].tasks[0].start_date" id="departments[0].projects[0].tasks[0].start_date" max="2026-03-07" min="1876-01-01" type="date" />
            <div class="age-display" id="departments[0].projects[0].tasks[0].start_date_age" style="margin-top: 5px; font-size: 0.9em; color: #666;"></div>
            <script>
            document.addEventListener('DOMContentLoaded', function() {
                const birthdateField = document.getElementById('departments[0].projects[0].tasks[0].start_date');
                const ageDisplay = document.getElementById('departments[0].projects[0].tasks[0].start_date_age');

                function calculateAge() {
                    if (birthdateField.value && ageDisplay) {
                        const birthDate = new Date(birthdateField.value);
                        const today = new Date();
                        let age = today.getFullYear() - birthDate.getFullYear();
                        const monthDiff = today.getMonth() - birthDate.getMonth();

                        if (monthDiff < 0 || (monthDiff === 0 && today.getDate() < birthDate.getDate())) {
                            age--;
                        }

                        ageDisplay.textContent = age >= 0 ? `Age: ${age} years` : '';
                    }
                }

                if (birthdateField) {
                    birthdateField.addEventListener('change', calculateAge);
                    calculateAge(); // Calculate on load if value is set
                }
            });
            </script>
            </div>
<div class="help-text">When should this task start?</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].projects[0].tasks[0].due_date">Due Date</label>
<div class="birthdate-input-group"><input name="departments[0].projects[0].tasks[0].due_date" id="departments[0].projects[0].tasks[0].due_date" max="2026-03-07" min="1876-01-01" type="date" />
            <div class="age-display" id="departments[0].projects[0].tasks[0].due_date_age" style="margin-top: 5px; font-size: 0.9em; color: #666;"></div>
            <script>
            document.addEventListener('DOMContentLoaded', function() {
                const birthdateField = document.getElementById('departments[0].projects[0].tasks[0].due_date');
                const ageDisplay = document.getElementById('departments[0].projects[0].tasks[0].due_date_age');

                function calculateAge() {
                    if (birthdateField.value && ageDisplay) {
                        const birthDate = new Date(birthdateField.value);
                        const today = new Date();
                        let age = today.getFullYear() - birthDate.getFullYear();
                        const monthDiff = today.getMonth() - birthDate.getMonth();

                        if (monthDiff < 0 || (monthDiff === 0 && today.getDate() < birthDate.getDate())) {
                            age--;
                        }

                        ageDisplay.textContent = age >= 0 ? `Age: ${age} years` : '';
                    }
                }

                if (birthdateField) {
                    birthdateField.addEventListener('change', calculateAge);
                    calculateAge(); // Calculate on load if value is set
                }
            });
            </script>
            </div>
<div class="help-text">When is this task due?</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].projects[0].tasks[0].assigned_to">Assigned To</label>
<input name="departments[0].projects[0].tasks[0].assigned_to" id="departments[0].projects[0].tasks[0].assigned_to" placeholder="Team member name" type="text" />
<div class="help-text">Who is responsible for this task?</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].projects[0].tasks[0].estimated_hours">Estimated Hours</label>
<input name="departments[0].projects[0].tasks[0].estimated_hours" id="departments[0].projects[0].tasks[0].estimated_hours" min="0.5" max="1000" step="0.1" placeholder="50.0%" inputmode="numeric" type="number" />
<div class="help-text">Estimated time to complete (in hours)</div></div>
                </div>
                <div class="col-12">
                    
<div class="model-list-block" data-field-name="departments[0].projects[0].tasks[0].subtasks" data-min-items="0" data-max-items="50">
    <div class="model-list-items" id="departments[0].projects[0].tasks[0].subtasks-items"><template class="model-list-item-template">
        <div class="model-list-item card border mb-3"
             data-index="0"
             data-title-template="πŸ”Ή {title}"
             data-field-name="departments[0].projects[0].tasks[0].subtasks">
            <div class="card-header d-flex justify-content-between align-items-center">
                <h6 class="mb-0">
                    <button class="btn btn-link text-decoration-none p-0 text-start"
                            type="button"
                            data-bs-toggle="collapse"
                            data-bs-target="#departments_0__projects_0__tasks_0__subtasks_item_0_content"
                            aria-expanded="false"
                            aria-controls="departments_0__projects_0__tasks_0__subtasks_item_0_content">
                        <i class="bi bi-chevron-right me-2"></i>
                        <i class="bi bi-card-list me-2"></i>
                        Item #1
                    </button>
                </h6>
                <button type="button"
                        class="btn btn-outline-danger btn-sm remove-item-btn"
                        data-index="0"
                        data-field-name="departments[0].projects[0].tasks[0].subtasks"
                        title="Remove this item">
                    <i class="bi bi-trash"></i>
                </button>
            </div>
            <div class="collapse collapse show" id="departments_0__projects_0__tasks_0__subtasks_item_0_content">
                <div class="card-body"><div class="row">
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].projects[0].tasks[0].subtasks[0].title">Subtask Title</label>
<input name="departments[0].projects[0].tasks[0].subtasks[0].title" id="departments[0].projects[0].tasks[0].subtasks[0].title" maxlength="200" placeholder="Brief description of the subtask" type="text" />
<div class="help-text">What is this subtask about?</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].projects[0].tasks[0].subtasks[0].description">Description</label>
<textarea name="departments[0].projects[0].tasks[0].subtasks[0].description" id="departments[0].projects[0].tasks[0].subtasks[0].description" placeholder="Detailed description of the subtask"></textarea>
<div class="help-text">Additional details about this subtask</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].projects[0].tasks[0].subtasks[0].assigned_to">Assigned To</label>
<input name="departments[0].projects[0].tasks[0].subtasks[0].assigned_to" id="departments[0].projects[0].tasks[0].subtasks[0].assigned_to" maxlength="100" placeholder="Team member name" type="text" />
<div class="help-text">Who is responsible for this subtask?</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].projects[0].tasks[0].subtasks[0].estimated_hours">Estimated Hours</label>
<input name="departments[0].projects[0].tasks[0].subtasks[0].estimated_hours" id="departments[0].projects[0].tasks[0].subtasks[0].estimated_hours" min="0.5" max="100" step="0.1" placeholder="50.0%" inputmode="numeric" type="number" />
<div class="help-text">Estimated time to complete</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><div class="field">
<label for="departments[0].projects[0].tasks[0].subtasks[0].status">Status</label>
<select name="departments[0].projects[0].tasks[0].subtasks[0].status" id="departments[0].projects[0].tasks[0].subtasks[0].status"><option value="pending">⏳ Pending</option>
<option value="in_progress">πŸ”„ In Progress</option>
<option value="completed">βœ… Completed</option>
<option value="blocked">🚫 Blocked</option></select>
<div class="help-text">Current status of the subtask</div>
</div></div>
                </div></div>
                </div>
            </div>
        </div></template>
        <div class="model-list-item card border mb-3"
             data-index="0"
             data-title-template="πŸ”Ή {title}"
             data-field-name="departments[0].projects[0].tasks[0].subtasks">
            <div class="card-header d-flex justify-content-between align-items-center">
                <h6 class="mb-0">
                    <button class="btn btn-link text-decoration-none p-0 text-start"
                            type="button"
                            data-bs-toggle="collapse"
                            data-bs-target="#departments_0__projects_0__tasks_0__subtasks_item_0_content"
                            aria-expanded="false"
                            aria-controls="departments_0__projects_0__tasks_0__subtasks_item_0_content">
                        <i class="bi bi-chevron-right me-2"></i>
                        <i class="bi bi-card-list me-2"></i>
                        Item #1
                    </button>
                </h6>
                <button type="button"
                        class="btn btn-outline-danger btn-sm remove-item-btn"
                        data-index="0"
                        data-field-name="departments[0].projects[0].tasks[0].subtasks"
                        title="Remove this item">
                    <i class="bi bi-trash"></i>
                </button>
            </div>
            <div class="collapse collapse show" id="departments_0__projects_0__tasks_0__subtasks_item_0_content">
                <div class="card-body"><div class="row">
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].projects[0].tasks[0].subtasks[0].title">Subtask Title</label>
<input name="departments[0].projects[0].tasks[0].subtasks[0].title" id="departments[0].projects[0].tasks[0].subtasks[0].title" maxlength="200" placeholder="Brief description of the subtask" type="text" />
<div class="help-text">What is this subtask about?</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].projects[0].tasks[0].subtasks[0].description">Description</label>
<textarea name="departments[0].projects[0].tasks[0].subtasks[0].description" id="departments[0].projects[0].tasks[0].subtasks[0].description" placeholder="Detailed description of the subtask"></textarea>
<div class="help-text">Additional details about this subtask</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].projects[0].tasks[0].subtasks[0].assigned_to">Assigned To</label>
<input name="departments[0].projects[0].tasks[0].subtasks[0].assigned_to" id="departments[0].projects[0].tasks[0].subtasks[0].assigned_to" maxlength="100" placeholder="Team member name" type="text" />
<div class="help-text">Who is responsible for this subtask?</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].projects[0].tasks[0].subtasks[0].estimated_hours">Estimated Hours</label>
<input name="departments[0].projects[0].tasks[0].subtasks[0].estimated_hours" id="departments[0].projects[0].tasks[0].subtasks[0].estimated_hours" min="0.5" max="100" step="0.1" placeholder="50.0%" inputmode="numeric" type="number" />
<div class="help-text">Estimated time to complete</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><div class="field">
<label for="departments[0].projects[0].tasks[0].subtasks[0].status">Status</label>
<select name="departments[0].projects[0].tasks[0].subtasks[0].status" id="departments[0].projects[0].tasks[0].subtasks[0].status"><option value="pending">⏳ Pending</option>
<option value="in_progress">πŸ”„ In Progress</option>
<option value="completed">βœ… Completed</option>
<option value="blocked">🚫 Blocked</option></select>
<div class="help-text">Current status of the subtask</div>
</div></div>
                </div></div>
                </div>
            </div>
        </div></div>
    <button type="button" class="add-item-btn" data-target="departments[0].projects[0].tasks[0].subtasks">Add Item</button>
    
<div class="model-list-help">Break down this task into smaller subtasks</div>

    
</div>

                </div></div>
                </div>
            </div>
        </div></div>
    <button type="button" class="add-item-btn" data-target="departments[0].projects[0].tasks">Add Item</button>
    
<div class="model-list-help">Add tasks with subtasks to organize project work</div>

    
</div>

                </div></div>
                </div>
            </div>
        </div></div>
    <button type="button" class="add-item-btn" data-target="departments[0].projects">Add Item</button>
    
<div class="model-list-help">Projects managed by this department</div>

    
</div>

                </div></div>
                </div>
            </div>
        </div></template>
        <div class="model-list-item card border mb-3"
             data-index="0"
             data-title-template="🏒 {name} (Head: {department_head})"
             data-field-name="departments">
            <div class="card-header d-flex justify-content-between align-items-center">
                <h6 class="mb-0">
                    <button class="btn btn-link text-decoration-none p-0 text-start"
                            type="button"
                            data-bs-toggle="collapse"
                            data-bs-target="#departments_item_0_content"
                            aria-expanded="false"
                            aria-controls="departments_item_0_content">
                        <i class="bi bi-chevron-right me-2"></i>
                        <i class="bi bi-card-list me-2"></i>
                        🏒 Engineering (Head: John Doe)
                    </button>
                </h6>
                <button type="button"
                        class="btn btn-outline-danger btn-sm remove-item-btn"
                        data-index="0"
                        data-field-name="departments"
                        title="Remove this item">
                    <i class="bi bi-trash"></i>
                </button>
            </div>
            <div class="collapse collapse show" id="departments_item_0_content">
                <div class="card-body"><div class="row">
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].name">Department Name</label>
<input name="departments[0].name" id="departments[0].name" value="Engineering" minlength="2" maxlength="100" placeholder="e.g., Engineering, Sales" type="text" />
<div class="help-text">Name of the department</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].description">Department Description</label>
<textarea name="departments[0].description" id="departments[0].description" placeholder="What does this department do?">Software development and infrastructure</textarea>
<div class="help-text">Description of department responsibilities</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].department_head">Department Head</label>
<input name="departments[0].department_head" id="departments[0].department_head" value="John Doe" maxlength="100" placeholder="Head of department name" type="text" />
<div class="help-text">Who leads this department?</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].head_email">Department Head Email</label>
<input name="departments[0].head_email" id="departments[0].head_email" value="john.doe@techcorp.com" placeholder="head@company.com" inputmode="email" type="email" />
<div class="help-text">Contact email for the department head</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].established_date">Established Date</label>
<div class="birthdate-input-group"><input name="departments[0].established_date" id="departments[0].established_date" value="2010-06-01" max="2026-03-07" min="1876-01-01" type="date" />
            <div class="age-display" id="departments[0].established_date_age" style="margin-top: 5px; font-size: 0.9em; color: #666;"></div>
            <script>
            document.addEventListener('DOMContentLoaded', function() {
                const birthdateField = document.getElementById('departments[0].established_date');
                const ageDisplay = document.getElementById('departments[0].established_date_age');

                function calculateAge() {
                    if (birthdateField.value && ageDisplay) {
                        const birthDate = new Date(birthdateField.value);
                        const today = new Date();
                        let age = today.getFullYear() - birthDate.getFullYear();
                        const monthDiff = today.getMonth() - birthDate.getMonth();

                        if (monthDiff < 0 || (monthDiff === 0 && today.getDate() < birthDate.getDate())) {
                            age--;
                        }

                        ageDisplay.textContent = age >= 0 ? `Age: ${age} years` : '';
                    }
                }

                if (birthdateField) {
                    birthdateField.addEventListener('change', calculateAge);
                    calculateAge(); // Calculate on load if value is set
                }
            });
            </script>
            </div>
<div class="help-text">When was this department established?</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].budget">Annual Budget ($)</label>
<input name="departments[0].budget" id="departments[0].budget" value="50000000.0" min="0" max="100" step="0.1" placeholder="50.0%" inputmode="numeric" type="number" />
<div class="help-text">Department annual budget in USD</div></div>
                </div>
                <div class="col-12">
                    
<div class="model-list-block" data-field-name="departments[0].teams" data-min-items="1" data-max-items="50">
    <div class="model-list-items" id="departments[0].teams-items"><template class="model-list-item-template">
        <div class="model-list-item card border mb-3"
             data-index="0"
             data-title-template="πŸ‘₯ {name} (Lead: {team_lead})"
             data-field-name="departments[0].teams">
            <div class="card-header d-flex justify-content-between align-items-center">
                <h6 class="mb-0">
                    <button class="btn btn-link text-decoration-none p-0 text-start"
                            type="button"
                            data-bs-toggle="collapse"
                            data-bs-target="#departments_0__teams_item_0_content"
                            aria-expanded="false"
                            aria-controls="departments_0__teams_item_0_content">
                        <i class="bi bi-chevron-right me-2"></i>
                        <i class="bi bi-card-list me-2"></i>
                        Item #1
                    </button>
                </h6>
                <button type="button"
                        class="btn btn-outline-danger btn-sm remove-item-btn"
                        data-index="0"
                        data-field-name="departments[0].teams"
                        title="Remove this item">
                    <i class="bi bi-trash"></i>
                </button>
            </div>
            <div class="collapse collapse show" id="departments_0__teams_item_0_content">
                <div class="card-body"><div class="row">
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].teams[0].name">Team Name</label>
<input name="departments[0].teams[0].name" id="departments[0].teams[0].name" minlength="2" maxlength="100" placeholder="e.g., Backend Team" type="text" />
<div class="help-text">Name of the team</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].teams[0].description">Team Description</label>
<textarea name="departments[0].teams[0].description" id="departments[0].teams[0].description" placeholder="What does this team do?"></textarea>
<div class="help-text">Brief description of the team&#x27;s responsibilities</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].teams[0].team_lead">Team Lead Name</label>
<input name="departments[0].teams[0].team_lead" id="departments[0].teams[0].team_lead" maxlength="100" placeholder="Name of the team lead" type="text" />
<div class="help-text">Who leads this team?</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].teams[0].formed_date">Formation Date</label>
<div class="birthdate-input-group"><input name="departments[0].teams[0].formed_date" id="departments[0].teams[0].formed_date" max="2026-03-07" min="1876-01-01" type="date" />
            <div class="age-display" id="departments[0].teams[0].formed_date_age" style="margin-top: 5px; font-size: 0.9em; color: #666;"></div>
            <script>
            document.addEventListener('DOMContentLoaded', function() {
                const birthdateField = document.getElementById('departments[0].teams[0].formed_date');
                const ageDisplay = document.getElementById('departments[0].teams[0].formed_date_age');

                function calculateAge() {
                    if (birthdateField.value && ageDisplay) {
                        const birthDate = new Date(birthdateField.value);
                        const today = new Date();
                        let age = today.getFullYear() - birthDate.getFullYear();
                        const monthDiff = today.getMonth() - birthDate.getMonth();

                        if (monthDiff < 0 || (monthDiff === 0 && today.getDate() < birthDate.getDate())) {
                            age--;
                        }

                        ageDisplay.textContent = age >= 0 ? `Age: ${age} years` : '';
                    }
                }

                if (birthdateField) {
                    birthdateField.addEventListener('change', calculateAge);
                    calculateAge(); // Calculate on load if value is set
                }
            });
            </script>
            </div>
<div class="help-text">When was this team formed?</div></div>
                </div>
                <div class="col-12">
                    
<div class="model-list-block" data-field-name="departments[0].teams[0].members" data-min-items="1" data-max-items="100">
    <div class="model-list-items" id="departments[0].teams[0].members-items"><template class="model-list-item-template">
        <div class="model-list-item card border mb-3"
             data-index="0"
             data-title-template="πŸ‘€ {name} - {role}"
             data-field-name="departments[0].teams[0].members">
            <div class="card-header d-flex justify-content-between align-items-center">
                <h6 class="mb-0">
                    <button class="btn btn-link text-decoration-none p-0 text-start"
                            type="button"
                            data-bs-toggle="collapse"
                            data-bs-target="#departments_0__teams_0__members_item_0_content"
                            aria-expanded="false"
                            aria-controls="departments_0__teams_0__members_item_0_content">
                        <i class="bi bi-chevron-right me-2"></i>
                        <i class="bi bi-card-list me-2"></i>
                        Item #1
                    </button>
                </h6>
                <button type="button"
                        class="btn btn-outline-danger btn-sm remove-item-btn"
                        data-index="0"
                        data-field-name="departments[0].teams[0].members"
                        title="Remove this item">
                    <i class="bi bi-trash"></i>
                </button>
            </div>
            <div class="collapse collapse show" id="departments_0__teams_0__members_item_0_content">
                <div class="card-body"><div class="row">
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].teams[0].members[0].name">Member Name</label>
<input name="departments[0].teams[0].members[0].name" id="departments[0].teams[0].members[0].name" minlength="2" maxlength="100" placeholder="Enter full name" type="text" />
<div class="help-text">Full name of the team member</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].teams[0].members[0].email">Email Address</label>
<input name="departments[0].teams[0].members[0].email" id="departments[0].teams[0].members[0].email" placeholder="member@company.com" inputmode="email" type="email" />
<div class="help-text">Contact email address</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].teams[0].members[0].role">Role</label>
<input name="departments[0].teams[0].members[0].role" id="departments[0].teams[0].members[0].role" maxlength="100" placeholder="e.g., Senior Developer" type="text" />
<div class="help-text">Job title or role</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].teams[0].members[0].hire_date">Hire Date</label>
<div class="birthdate-input-group"><input name="departments[0].teams[0].members[0].hire_date" id="departments[0].teams[0].members[0].hire_date" max="2026-03-07" min="1876-01-01" type="date" />
            <div class="age-display" id="departments[0].teams[0].members[0].hire_date_age" style="margin-top: 5px; font-size: 0.9em; color: #666;"></div>
            <script>
            document.addEventListener('DOMContentLoaded', function() {
                const birthdateField = document.getElementById('departments[0].teams[0].members[0].hire_date');
                const ageDisplay = document.getElementById('departments[0].teams[0].members[0].hire_date_age');

                function calculateAge() {
                    if (birthdateField.value && ageDisplay) {
                        const birthDate = new Date(birthdateField.value);
                        const today = new Date();
                        let age = today.getFullYear() - birthDate.getFullYear();
                        const monthDiff = today.getMonth() - birthDate.getMonth();

                        if (monthDiff < 0 || (monthDiff === 0 && today.getDate() < birthDate.getDate())) {
                            age--;
                        }

                        ageDisplay.textContent = age >= 0 ? `Age: ${age} years` : '';
                    }
                }

                if (birthdateField) {
                    birthdateField.addEventListener('change', calculateAge);
                    calculateAge(); // Calculate on load if value is set
                }
            });
            </script>
            </div>
<div class="help-text">When did this person join?</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].teams[0].members[0].experience_years">Years of Experience</label>
<input name="departments[0].teams[0].members[0].experience_years" id="departments[0].teams[0].members[0].experience_years" min="0" max="70" step="0.1" placeholder="50.0%" inputmode="numeric" type="number" />
<div class="help-text">Total professional experience in years</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].teams[0].members[0].manager">Manager Name</label>
<input name="departments[0].teams[0].members[0].manager" id="departments[0].teams[0].members[0].manager" placeholder="Direct manager name" type="text" />
<div class="help-text">Who supervises this team member?</div></div>
                </div>
                <div class="col-12">
                    
<div class="model-list-block" data-field-name="departments[0].teams[0].members[0].certifications" data-min-items="0" data-max-items="20">
    <div class="model-list-items" id="departments[0].teams[0].members[0].certifications-items"><template class="model-list-item-template">
        <div class="model-list-item card border mb-3"
             data-index="0"
             data-title-template="{name} - {issuer}"
             data-field-name="departments[0].teams[0].members[0].certifications">
            <div class="card-header d-flex justify-content-between align-items-center">
                <h6 class="mb-0">
                    <button class="btn btn-link text-decoration-none p-0 text-start"
                            type="button"
                            data-bs-toggle="collapse"
                            data-bs-target="#departments_0__teams_0__members_0__certifications_item_0_content"
                            aria-expanded="false"
                            aria-controls="departments_0__teams_0__members_0__certifications_item_0_content">
                        <i class="bi bi-chevron-right me-2"></i>
                        <i class="bi bi-card-list me-2"></i>
                        Item #1
                    </button>
                </h6>
                <button type="button"
                        class="btn btn-outline-danger btn-sm remove-item-btn"
                        data-index="0"
                        data-field-name="departments[0].teams[0].members[0].certifications"
                        title="Remove this item">
                    <i class="bi bi-trash"></i>
                </button>
            </div>
            <div class="collapse collapse show" id="departments_0__teams_0__members_0__certifications_item_0_content">
                <div class="card-body"><div class="row">
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].teams[0].members[0].certifications[0].name">Certification Name</label>
<input name="departments[0].teams[0].members[0].certifications[0].name" id="departments[0].teams[0].members[0].certifications[0].name" maxlength="100" placeholder="e.g., AWS Solutions Architect" type="text" />
<div class="help-text">Name of the certification</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].teams[0].members[0].certifications[0].issuer">Issuing Organization</label>
<input name="departments[0].teams[0].members[0].certifications[0].issuer" id="departments[0].teams[0].members[0].certifications[0].issuer" maxlength="100" placeholder="e.g., Amazon Web Services" type="text" />
<div class="help-text">Organization that issued the certification</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].teams[0].members[0].certifications[0].issue_date">Issue Date</label>
<div class="birthdate-input-group"><input name="departments[0].teams[0].members[0].certifications[0].issue_date" id="departments[0].teams[0].members[0].certifications[0].issue_date" max="2026-03-07" min="1876-01-01" type="date" />
            <div class="age-display" id="departments[0].teams[0].members[0].certifications[0].issue_date_age" style="margin-top: 5px; font-size: 0.9em; color: #666;"></div>
            <script>
            document.addEventListener('DOMContentLoaded', function() {
                const birthdateField = document.getElementById('departments[0].teams[0].members[0].certifications[0].issue_date');
                const ageDisplay = document.getElementById('departments[0].teams[0].members[0].certifications[0].issue_date_age');

                function calculateAge() {
                    if (birthdateField.value && ageDisplay) {
                        const birthDate = new Date(birthdateField.value);
                        const today = new Date();
                        let age = today.getFullYear() - birthDate.getFullYear();
                        const monthDiff = today.getMonth() - birthDate.getMonth();

                        if (monthDiff < 0 || (monthDiff === 0 && today.getDate() < birthDate.getDate())) {
                            age--;
                        }

                        ageDisplay.textContent = age >= 0 ? `Age: ${age} years` : '';
                    }
                }

                if (birthdateField) {
                    birthdateField.addEventListener('change', calculateAge);
                    calculateAge(); // Calculate on load if value is set
                }
            });
            </script>
            </div>
<div class="help-text">When was this certification issued?</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].teams[0].members[0].certifications[0].expiry_date">Expiry Date</label>
<div class="birthdate-input-group"><input name="departments[0].teams[0].members[0].certifications[0].expiry_date" id="departments[0].teams[0].members[0].certifications[0].expiry_date" max="2026-03-07" min="1876-01-01" type="date" />
            <div class="age-display" id="departments[0].teams[0].members[0].certifications[0].expiry_date_age" style="margin-top: 5px; font-size: 0.9em; color: #666;"></div>
            <script>
            document.addEventListener('DOMContentLoaded', function() {
                const birthdateField = document.getElementById('departments[0].teams[0].members[0].certifications[0].expiry_date');
                const ageDisplay = document.getElementById('departments[0].teams[0].members[0].certifications[0].expiry_date_age');

                function calculateAge() {
                    if (birthdateField.value && ageDisplay) {
                        const birthDate = new Date(birthdateField.value);
                        const today = new Date();
                        let age = today.getFullYear() - birthDate.getFullYear();
                        const monthDiff = today.getMonth() - birthDate.getMonth();

                        if (monthDiff < 0 || (monthDiff === 0 && today.getDate() < birthDate.getDate())) {
                            age--;
                        }

                        ageDisplay.textContent = age >= 0 ? `Age: ${age} years` : '';
                    }
                }

                if (birthdateField) {
                    birthdateField.addEventListener('change', calculateAge);
                    calculateAge(); // Calculate on load if value is set
                }
            });
            </script>
            </div>
<div class="help-text">When does this certification expire? (Leave empty if no expiry)</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].teams[0].members[0].certifications[0].credential_id">Credential ID</label>
<input name="departments[0].teams[0].members[0].certifications[0].credential_id" id="departments[0].teams[0].members[0].certifications[0].credential_id" placeholder="Optional credential identifier" type="text" />
<div class="help-text">Unique ID for credential verification</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].teams[0].members[0].certifications[0].credential_url">Credential URL</label>
<input name="departments[0].teams[0].members[0].certifications[0].credential_url" id="departments[0].teams[0].members[0].certifications[0].credential_url" placeholder="https://..." type="text" />
<div class="help-text">Link to verify the credential</div></div>
                </div></div>
                </div>
            </div>
        </div></template>
        <div class="model-list-item card border mb-3"
             data-index="0"
             data-title-template="{name} - {issuer}"
             data-field-name="departments[0].teams[0].members[0].certifications">
            <div class="card-header d-flex justify-content-between align-items-center">
                <h6 class="mb-0">
                    <button class="btn btn-link text-decoration-none p-0 text-start"
                            type="button"
                            data-bs-toggle="collapse"
                            data-bs-target="#departments_0__teams_0__members_0__certifications_item_0_content"
                            aria-expanded="false"
                            aria-controls="departments_0__teams_0__members_0__certifications_item_0_content">
                        <i class="bi bi-chevron-right me-2"></i>
                        <i class="bi bi-card-list me-2"></i>
                        Item #1
                    </button>
                </h6>
                <button type="button"
                        class="btn btn-outline-danger btn-sm remove-item-btn"
                        data-index="0"
                        data-field-name="departments[0].teams[0].members[0].certifications"
                        title="Remove this item">
                    <i class="bi bi-trash"></i>
                </button>
            </div>
            <div class="collapse collapse show" id="departments_0__teams_0__members_0__certifications_item_0_content">
                <div class="card-body"><div class="row">
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].teams[0].members[0].certifications[0].name">Certification Name</label>
<input name="departments[0].teams[0].members[0].certifications[0].name" id="departments[0].teams[0].members[0].certifications[0].name" maxlength="100" placeholder="e.g., AWS Solutions Architect" type="text" />
<div class="help-text">Name of the certification</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].teams[0].members[0].certifications[0].issuer">Issuing Organization</label>
<input name="departments[0].teams[0].members[0].certifications[0].issuer" id="departments[0].teams[0].members[0].certifications[0].issuer" maxlength="100" placeholder="e.g., Amazon Web Services" type="text" />
<div class="help-text">Organization that issued the certification</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].teams[0].members[0].certifications[0].issue_date">Issue Date</label>
<div class="birthdate-input-group"><input name="departments[0].teams[0].members[0].certifications[0].issue_date" id="departments[0].teams[0].members[0].certifications[0].issue_date" max="2026-03-07" min="1876-01-01" type="date" />
            <div class="age-display" id="departments[0].teams[0].members[0].certifications[0].issue_date_age" style="margin-top: 5px; font-size: 0.9em; color: #666;"></div>
            <script>
            document.addEventListener('DOMContentLoaded', function() {
                const birthdateField = document.getElementById('departments[0].teams[0].members[0].certifications[0].issue_date');
                const ageDisplay = document.getElementById('departments[0].teams[0].members[0].certifications[0].issue_date_age');

                function calculateAge() {
                    if (birthdateField.value && ageDisplay) {
                        const birthDate = new Date(birthdateField.value);
                        const today = new Date();
                        let age = today.getFullYear() - birthDate.getFullYear();
                        const monthDiff = today.getMonth() - birthDate.getMonth();

                        if (monthDiff < 0 || (monthDiff === 0 && today.getDate() < birthDate.getDate())) {
                            age--;
                        }

                        ageDisplay.textContent = age >= 0 ? `Age: ${age} years` : '';
                    }
                }

                if (birthdateField) {
                    birthdateField.addEventListener('change', calculateAge);
                    calculateAge(); // Calculate on load if value is set
                }
            });
            </script>
            </div>
<div class="help-text">When was this certification issued?</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].teams[0].members[0].certifications[0].expiry_date">Expiry Date</label>
<div class="birthdate-input-group"><input name="departments[0].teams[0].members[0].certifications[0].expiry_date" id="departments[0].teams[0].members[0].certifications[0].expiry_date" max="2026-03-07" min="1876-01-01" type="date" />
            <div class="age-display" id="departments[0].teams[0].members[0].certifications[0].expiry_date_age" style="margin-top: 5px; font-size: 0.9em; color: #666;"></div>
            <script>
            document.addEventListener('DOMContentLoaded', function() {
                const birthdateField = document.getElementById('departments[0].teams[0].members[0].certifications[0].expiry_date');
                const ageDisplay = document.getElementById('departments[0].teams[0].members[0].certifications[0].expiry_date_age');

                function calculateAge() {
                    if (birthdateField.value && ageDisplay) {
                        const birthDate = new Date(birthdateField.value);
                        const today = new Date();
                        let age = today.getFullYear() - birthDate.getFullYear();
                        const monthDiff = today.getMonth() - birthDate.getMonth();

                        if (monthDiff < 0 || (monthDiff === 0 && today.getDate() < birthDate.getDate())) {
                            age--;
                        }

                        ageDisplay.textContent = age >= 0 ? `Age: ${age} years` : '';
                    }
                }

                if (birthdateField) {
                    birthdateField.addEventListener('change', calculateAge);
                    calculateAge(); // Calculate on load if value is set
                }
            });
            </script>
            </div>
<div class="help-text">When does this certification expire? (Leave empty if no expiry)</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].teams[0].members[0].certifications[0].credential_id">Credential ID</label>
<input name="departments[0].teams[0].members[0].certifications[0].credential_id" id="departments[0].teams[0].members[0].certifications[0].credential_id" placeholder="Optional credential identifier" type="text" />
<div class="help-text">Unique ID for credential verification</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].teams[0].members[0].certifications[0].credential_url">Credential URL</label>
<input name="departments[0].teams[0].members[0].certifications[0].credential_url" id="departments[0].teams[0].members[0].certifications[0].credential_url" placeholder="https://..." type="text" />
<div class="help-text">Link to verify the credential</div></div>
                </div></div>
                </div>
            </div>
        </div></div>
    <button type="button" class="add-item-btn" data-target="departments[0].teams[0].members[0].certifications">Add Item</button>
    
<div class="model-list-help">Professional certifications and credentials</div>

    
</div>

                </div></div>
                </div>
            </div>
        </div></template>
        <div class="model-list-item card border mb-3"
             data-index="0"
             data-title-template="πŸ‘€ {name} - {role}"
             data-field-name="departments[0].teams[0].members">
            <div class="card-header d-flex justify-content-between align-items-center">
                <h6 class="mb-0">
                    <button class="btn btn-link text-decoration-none p-0 text-start"
                            type="button"
                            data-bs-toggle="collapse"
                            data-bs-target="#departments_0__teams_0__members_item_0_content"
                            aria-expanded="false"
                            aria-controls="departments_0__teams_0__members_item_0_content">
                        <i class="bi bi-chevron-right me-2"></i>
                        <i class="bi bi-card-list me-2"></i>
                        Item #1
                    </button>
                </h6>
                <button type="button"
                        class="btn btn-outline-danger btn-sm remove-item-btn"
                        data-index="0"
                        data-field-name="departments[0].teams[0].members"
                        title="Remove this item">
                    <i class="bi bi-trash"></i>
                </button>
            </div>
            <div class="collapse collapse show" id="departments_0__teams_0__members_item_0_content">
                <div class="card-body"><div class="row">
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].teams[0].members[0].name">Member Name</label>
<input name="departments[0].teams[0].members[0].name" id="departments[0].teams[0].members[0].name" minlength="2" maxlength="100" placeholder="Enter full name" type="text" />
<div class="help-text">Full name of the team member</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].teams[0].members[0].email">Email Address</label>
<input name="departments[0].teams[0].members[0].email" id="departments[0].teams[0].members[0].email" placeholder="member@company.com" inputmode="email" type="email" />
<div class="help-text">Contact email address</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].teams[0].members[0].role">Role</label>
<input name="departments[0].teams[0].members[0].role" id="departments[0].teams[0].members[0].role" maxlength="100" placeholder="e.g., Senior Developer" type="text" />
<div class="help-text">Job title or role</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].teams[0].members[0].hire_date">Hire Date</label>
<div class="birthdate-input-group"><input name="departments[0].teams[0].members[0].hire_date" id="departments[0].teams[0].members[0].hire_date" max="2026-03-07" min="1876-01-01" type="date" />
            <div class="age-display" id="departments[0].teams[0].members[0].hire_date_age" style="margin-top: 5px; font-size: 0.9em; color: #666;"></div>
            <script>
            document.addEventListener('DOMContentLoaded', function() {
                const birthdateField = document.getElementById('departments[0].teams[0].members[0].hire_date');
                const ageDisplay = document.getElementById('departments[0].teams[0].members[0].hire_date_age');

                function calculateAge() {
                    if (birthdateField.value && ageDisplay) {
                        const birthDate = new Date(birthdateField.value);
                        const today = new Date();
                        let age = today.getFullYear() - birthDate.getFullYear();
                        const monthDiff = today.getMonth() - birthDate.getMonth();

                        if (monthDiff < 0 || (monthDiff === 0 && today.getDate() < birthDate.getDate())) {
                            age--;
                        }

                        ageDisplay.textContent = age >= 0 ? `Age: ${age} years` : '';
                    }
                }

                if (birthdateField) {
                    birthdateField.addEventListener('change', calculateAge);
                    calculateAge(); // Calculate on load if value is set
                }
            });
            </script>
            </div>
<div class="help-text">When did this person join?</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].teams[0].members[0].experience_years">Years of Experience</label>
<input name="departments[0].teams[0].members[0].experience_years" id="departments[0].teams[0].members[0].experience_years" min="0" max="70" step="0.1" placeholder="50.0%" inputmode="numeric" type="number" />
<div class="help-text">Total professional experience in years</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].teams[0].members[0].manager">Manager Name</label>
<input name="departments[0].teams[0].members[0].manager" id="departments[0].teams[0].members[0].manager" placeholder="Direct manager name" type="text" />
<div class="help-text">Who supervises this team member?</div></div>
                </div>
                <div class="col-12">
                    
<div class="model-list-block" data-field-name="departments[0].teams[0].members[0].certifications" data-min-items="0" data-max-items="20">
    <div class="model-list-items" id="departments[0].teams[0].members[0].certifications-items"><template class="model-list-item-template">
        <div class="model-list-item card border mb-3"
             data-index="0"
             data-title-template="{name} - {issuer}"
             data-field-name="departments[0].teams[0].members[0].certifications">
            <div class="card-header d-flex justify-content-between align-items-center">
                <h6 class="mb-0">
                    <button class="btn btn-link text-decoration-none p-0 text-start"
                            type="button"
                            data-bs-toggle="collapse"
                            data-bs-target="#departments_0__teams_0__members_0__certifications_item_0_content"
                            aria-expanded="false"
                            aria-controls="departments_0__teams_0__members_0__certifications_item_0_content">
                        <i class="bi bi-chevron-right me-2"></i>
                        <i class="bi bi-card-list me-2"></i>
                        Item #1
                    </button>
                </h6>
                <button type="button"
                        class="btn btn-outline-danger btn-sm remove-item-btn"
                        data-index="0"
                        data-field-name="departments[0].teams[0].members[0].certifications"
                        title="Remove this item">
                    <i class="bi bi-trash"></i>
                </button>
            </div>
            <div class="collapse collapse show" id="departments_0__teams_0__members_0__certifications_item_0_content">
                <div class="card-body"><div class="row">
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].teams[0].members[0].certifications[0].name">Certification Name</label>
<input name="departments[0].teams[0].members[0].certifications[0].name" id="departments[0].teams[0].members[0].certifications[0].name" maxlength="100" placeholder="e.g., AWS Solutions Architect" type="text" />
<div class="help-text">Name of the certification</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].teams[0].members[0].certifications[0].issuer">Issuing Organization</label>
<input name="departments[0].teams[0].members[0].certifications[0].issuer" id="departments[0].teams[0].members[0].certifications[0].issuer" maxlength="100" placeholder="e.g., Amazon Web Services" type="text" />
<div class="help-text">Organization that issued the certification</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].teams[0].members[0].certifications[0].issue_date">Issue Date</label>
<div class="birthdate-input-group"><input name="departments[0].teams[0].members[0].certifications[0].issue_date" id="departments[0].teams[0].members[0].certifications[0].issue_date" max="2026-03-07" min="1876-01-01" type="date" />
            <div class="age-display" id="departments[0].teams[0].members[0].certifications[0].issue_date_age" style="margin-top: 5px; font-size: 0.9em; color: #666;"></div>
            <script>
            document.addEventListener('DOMContentLoaded', function() {
                const birthdateField = document.getElementById('departments[0].teams[0].members[0].certifications[0].issue_date');
                const ageDisplay = document.getElementById('departments[0].teams[0].members[0].certifications[0].issue_date_age');

                function calculateAge() {
                    if (birthdateField.value && ageDisplay) {
                        const birthDate = new Date(birthdateField.value);
                        const today = new Date();
                        let age = today.getFullYear() - birthDate.getFullYear();
                        const monthDiff = today.getMonth() - birthDate.getMonth();

                        if (monthDiff < 0 || (monthDiff === 0 && today.getDate() < birthDate.getDate())) {
                            age--;
                        }

                        ageDisplay.textContent = age >= 0 ? `Age: ${age} years` : '';
                    }
                }

                if (birthdateField) {
                    birthdateField.addEventListener('change', calculateAge);
                    calculateAge(); // Calculate on load if value is set
                }
            });
            </script>
            </div>
<div class="help-text">When was this certification issued?</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].teams[0].members[0].certifications[0].expiry_date">Expiry Date</label>
<div class="birthdate-input-group"><input name="departments[0].teams[0].members[0].certifications[0].expiry_date" id="departments[0].teams[0].members[0].certifications[0].expiry_date" max="2026-03-07" min="1876-01-01" type="date" />
            <div class="age-display" id="departments[0].teams[0].members[0].certifications[0].expiry_date_age" style="margin-top: 5px; font-size: 0.9em; color: #666;"></div>
            <script>
            document.addEventListener('DOMContentLoaded', function() {
                const birthdateField = document.getElementById('departments[0].teams[0].members[0].certifications[0].expiry_date');
                const ageDisplay = document.getElementById('departments[0].teams[0].members[0].certifications[0].expiry_date_age');

                function calculateAge() {
                    if (birthdateField.value && ageDisplay) {
                        const birthDate = new Date(birthdateField.value);
                        const today = new Date();
                        let age = today.getFullYear() - birthDate.getFullYear();
                        const monthDiff = today.getMonth() - birthDate.getMonth();

                        if (monthDiff < 0 || (monthDiff === 0 && today.getDate() < birthDate.getDate())) {
                            age--;
                        }

                        ageDisplay.textContent = age >= 0 ? `Age: ${age} years` : '';
                    }
                }

                if (birthdateField) {
                    birthdateField.addEventListener('change', calculateAge);
                    calculateAge(); // Calculate on load if value is set
                }
            });
            </script>
            </div>
<div class="help-text">When does this certification expire? (Leave empty if no expiry)</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].teams[0].members[0].certifications[0].credential_id">Credential ID</label>
<input name="departments[0].teams[0].members[0].certifications[0].credential_id" id="departments[0].teams[0].members[0].certifications[0].credential_id" placeholder="Optional credential identifier" type="text" />
<div class="help-text">Unique ID for credential verification</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].teams[0].members[0].certifications[0].credential_url">Credential URL</label>
<input name="departments[0].teams[0].members[0].certifications[0].credential_url" id="departments[0].teams[0].members[0].certifications[0].credential_url" placeholder="https://..." type="text" />
<div class="help-text">Link to verify the credential</div></div>
                </div></div>
                </div>
            </div>
        </div></template>
        <div class="model-list-item card border mb-3"
             data-index="0"
             data-title-template="{name} - {issuer}"
             data-field-name="departments[0].teams[0].members[0].certifications">
            <div class="card-header d-flex justify-content-between align-items-center">
                <h6 class="mb-0">
                    <button class="btn btn-link text-decoration-none p-0 text-start"
                            type="button"
                            data-bs-toggle="collapse"
                            data-bs-target="#departments_0__teams_0__members_0__certifications_item_0_content"
                            aria-expanded="false"
                            aria-controls="departments_0__teams_0__members_0__certifications_item_0_content">
                        <i class="bi bi-chevron-right me-2"></i>
                        <i class="bi bi-card-list me-2"></i>
                        Item #1
                    </button>
                </h6>
                <button type="button"
                        class="btn btn-outline-danger btn-sm remove-item-btn"
                        data-index="0"
                        data-field-name="departments[0].teams[0].members[0].certifications"
                        title="Remove this item">
                    <i class="bi bi-trash"></i>
                </button>
            </div>
            <div class="collapse collapse show" id="departments_0__teams_0__members_0__certifications_item_0_content">
                <div class="card-body"><div class="row">
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].teams[0].members[0].certifications[0].name">Certification Name</label>
<input name="departments[0].teams[0].members[0].certifications[0].name" id="departments[0].teams[0].members[0].certifications[0].name" maxlength="100" placeholder="e.g., AWS Solutions Architect" type="text" />
<div class="help-text">Name of the certification</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].teams[0].members[0].certifications[0].issuer">Issuing Organization</label>
<input name="departments[0].teams[0].members[0].certifications[0].issuer" id="departments[0].teams[0].members[0].certifications[0].issuer" maxlength="100" placeholder="e.g., Amazon Web Services" type="text" />
<div class="help-text">Organization that issued the certification</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].teams[0].members[0].certifications[0].issue_date">Issue Date</label>
<div class="birthdate-input-group"><input name="departments[0].teams[0].members[0].certifications[0].issue_date" id="departments[0].teams[0].members[0].certifications[0].issue_date" max="2026-03-07" min="1876-01-01" type="date" />
            <div class="age-display" id="departments[0].teams[0].members[0].certifications[0].issue_date_age" style="margin-top: 5px; font-size: 0.9em; color: #666;"></div>
            <script>
            document.addEventListener('DOMContentLoaded', function() {
                const birthdateField = document.getElementById('departments[0].teams[0].members[0].certifications[0].issue_date');
                const ageDisplay = document.getElementById('departments[0].teams[0].members[0].certifications[0].issue_date_age');

                function calculateAge() {
                    if (birthdateField.value && ageDisplay) {
                        const birthDate = new Date(birthdateField.value);
                        const today = new Date();
                        let age = today.getFullYear() - birthDate.getFullYear();
                        const monthDiff = today.getMonth() - birthDate.getMonth();

                        if (monthDiff < 0 || (monthDiff === 0 && today.getDate() < birthDate.getDate())) {
                            age--;
                        }

                        ageDisplay.textContent = age >= 0 ? `Age: ${age} years` : '';
                    }
                }

                if (birthdateField) {
                    birthdateField.addEventListener('change', calculateAge);
                    calculateAge(); // Calculate on load if value is set
                }
            });
            </script>
            </div>
<div class="help-text">When was this certification issued?</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].teams[0].members[0].certifications[0].expiry_date">Expiry Date</label>
<div class="birthdate-input-group"><input name="departments[0].teams[0].members[0].certifications[0].expiry_date" id="departments[0].teams[0].members[0].certifications[0].expiry_date" max="2026-03-07" min="1876-01-01" type="date" />
            <div class="age-display" id="departments[0].teams[0].members[0].certifications[0].expiry_date_age" style="margin-top: 5px; font-size: 0.9em; color: #666;"></div>
            <script>
            document.addEventListener('DOMContentLoaded', function() {
                const birthdateField = document.getElementById('departments[0].teams[0].members[0].certifications[0].expiry_date');
                const ageDisplay = document.getElementById('departments[0].teams[0].members[0].certifications[0].expiry_date_age');

                function calculateAge() {
                    if (birthdateField.value && ageDisplay) {
                        const birthDate = new Date(birthdateField.value);
                        const today = new Date();
                        let age = today.getFullYear() - birthDate.getFullYear();
                        const monthDiff = today.getMonth() - birthDate.getMonth();

                        if (monthDiff < 0 || (monthDiff === 0 && today.getDate() < birthDate.getDate())) {
                            age--;
                        }

                        ageDisplay.textContent = age >= 0 ? `Age: ${age} years` : '';
                    }
                }

                if (birthdateField) {
                    birthdateField.addEventListener('change', calculateAge);
                    calculateAge(); // Calculate on load if value is set
                }
            });
            </script>
            </div>
<div class="help-text">When does this certification expire? (Leave empty if no expiry)</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].teams[0].members[0].certifications[0].credential_id">Credential ID</label>
<input name="departments[0].teams[0].members[0].certifications[0].credential_id" id="departments[0].teams[0].members[0].certifications[0].credential_id" placeholder="Optional credential identifier" type="text" />
<div class="help-text">Unique ID for credential verification</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].teams[0].members[0].certifications[0].credential_url">Credential URL</label>
<input name="departments[0].teams[0].members[0].certifications[0].credential_url" id="departments[0].teams[0].members[0].certifications[0].credential_url" placeholder="https://..." type="text" />
<div class="help-text">Link to verify the credential</div></div>
                </div></div>
                </div>
            </div>
        </div></div>
    <button type="button" class="add-item-btn" data-target="departments[0].teams[0].members[0].certifications">Add Item</button>
    
<div class="model-list-help">Professional certifications and credentials</div>

    
</div>

                </div></div>
                </div>
            </div>
        </div></div>
    <button type="button" class="add-item-btn" data-target="departments[0].teams[0].members">Add Item</button>
    
<div class="model-list-help">Add team members and their certifications</div>

    
</div>

                </div></div>
                </div>
            </div>
        </div></template>
        <div class="model-list-item card border mb-3"
             data-index="0"
             data-title-template="πŸ‘₯ {name} (Lead: {team_lead})"
             data-field-name="departments[0].teams">
            <div class="card-header d-flex justify-content-between align-items-center">
                <h6 class="mb-0">
                    <button class="btn btn-link text-decoration-none p-0 text-start"
                            type="button"
                            data-bs-toggle="collapse"
                            data-bs-target="#departments_0__teams_item_0_content"
                            aria-expanded="false"
                            aria-controls="departments_0__teams_item_0_content">
                        <i class="bi bi-chevron-right me-2"></i>
                        <i class="bi bi-card-list me-2"></i>
                        πŸ‘₯ Backend Services (Lead: Alice Johnson)
                    </button>
                </h6>
                <button type="button"
                        class="btn btn-outline-danger btn-sm remove-item-btn"
                        data-index="0"
                        data-field-name="departments[0].teams"
                        title="Remove this item">
                    <i class="bi bi-trash"></i>
                </button>
            </div>
            <div class="collapse collapse show" id="departments_0__teams_item_0_content">
                <div class="card-body"><div class="row">
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].teams[0].name">Team Name</label>
<input name="departments[0].teams[0].name" id="departments[0].teams[0].name" value="Backend Services" minlength="2" maxlength="100" placeholder="e.g., Backend Team" type="text" />
<div class="help-text">Name of the team</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].teams[0].description">Team Description</label>
<textarea name="departments[0].teams[0].description" id="departments[0].teams[0].description" placeholder="What does this team do?">API and database services</textarea>
<div class="help-text">Brief description of the team&#x27;s responsibilities</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].teams[0].team_lead">Team Lead Name</label>
<input name="departments[0].teams[0].team_lead" id="departments[0].teams[0].team_lead" value="Alice Johnson" maxlength="100" placeholder="Name of the team lead" type="text" />
<div class="help-text">Who leads this team?</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].teams[0].formed_date">Formation Date</label>
<div class="birthdate-input-group"><input name="departments[0].teams[0].formed_date" id="departments[0].teams[0].formed_date" value="2015-03-01" max="2026-03-07" min="1876-01-01" type="date" />
            <div class="age-display" id="departments[0].teams[0].formed_date_age" style="margin-top: 5px; font-size: 0.9em; color: #666;"></div>
            <script>
            document.addEventListener('DOMContentLoaded', function() {
                const birthdateField = document.getElementById('departments[0].teams[0].formed_date');
                const ageDisplay = document.getElementById('departments[0].teams[0].formed_date_age');

                function calculateAge() {
                    if (birthdateField.value && ageDisplay) {
                        const birthDate = new Date(birthdateField.value);
                        const today = new Date();
                        let age = today.getFullYear() - birthDate.getFullYear();
                        const monthDiff = today.getMonth() - birthDate.getMonth();

                        if (monthDiff < 0 || (monthDiff === 0 && today.getDate() < birthDate.getDate())) {
                            age--;
                        }

                        ageDisplay.textContent = age >= 0 ? `Age: ${age} years` : '';
                    }
                }

                if (birthdateField) {
                    birthdateField.addEventListener('change', calculateAge);
                    calculateAge(); // Calculate on load if value is set
                }
            });
            </script>
            </div>
<div class="help-text">When was this team formed?</div></div>
                </div>
                <div class="col-12">
                    
<div class="model-list-block" data-field-name="departments[0].teams[0].members" data-min-items="1" data-max-items="100">
    <div class="model-list-items" id="departments[0].teams[0].members-items"><template class="model-list-item-template">
        <div class="model-list-item card border mb-3"
             data-index="0"
             data-title-template="πŸ‘€ {name} - {role}"
             data-field-name="departments[0].teams[0].members">
            <div class="card-header d-flex justify-content-between align-items-center">
                <h6 class="mb-0">
                    <button class="btn btn-link text-decoration-none p-0 text-start"
                            type="button"
                            data-bs-toggle="collapse"
                            data-bs-target="#departments_0__teams_0__members_item_0_content"
                            aria-expanded="false"
                            aria-controls="departments_0__teams_0__members_item_0_content">
                        <i class="bi bi-chevron-right me-2"></i>
                        <i class="bi bi-card-list me-2"></i>
                        Item #1
                    </button>
                </h6>
                <button type="button"
                        class="btn btn-outline-danger btn-sm remove-item-btn"
                        data-index="0"
                        data-field-name="departments[0].teams[0].members"
                        title="Remove this item">
                    <i class="bi bi-trash"></i>
                </button>
            </div>
            <div class="collapse collapse show" id="departments_0__teams_0__members_item_0_content">
                <div class="card-body"><div class="row">
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].teams[0].members[0].name">Member Name</label>
<input name="departments[0].teams[0].members[0].name" id="departments[0].teams[0].members[0].name" minlength="2" maxlength="100" placeholder="Enter full name" type="text" />
<div class="help-text">Full name of the team member</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].teams[0].members[0].email">Email Address</label>
<input name="departments[0].teams[0].members[0].email" id="departments[0].teams[0].members[0].email" placeholder="member@company.com" inputmode="email" type="email" />
<div class="help-text">Contact email address</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].teams[0].members[0].role">Role</label>
<input name="departments[0].teams[0].members[0].role" id="departments[0].teams[0].members[0].role" maxlength="100" placeholder="e.g., Senior Developer" type="text" />
<div class="help-text">Job title or role</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].teams[0].members[0].hire_date">Hire Date</label>
<div class="birthdate-input-group"><input name="departments[0].teams[0].members[0].hire_date" id="departments[0].teams[0].members[0].hire_date" max="2026-03-07" min="1876-01-01" type="date" />
            <div class="age-display" id="departments[0].teams[0].members[0].hire_date_age" style="margin-top: 5px; font-size: 0.9em; color: #666;"></div>
            <script>
            document.addEventListener('DOMContentLoaded', function() {
                const birthdateField = document.getElementById('departments[0].teams[0].members[0].hire_date');
                const ageDisplay = document.getElementById('departments[0].teams[0].members[0].hire_date_age');

                function calculateAge() {
                    if (birthdateField.value && ageDisplay) {
                        const birthDate = new Date(birthdateField.value);
                        const today = new Date();
                        let age = today.getFullYear() - birthDate.getFullYear();
                        const monthDiff = today.getMonth() - birthDate.getMonth();

                        if (monthDiff < 0 || (monthDiff === 0 && today.getDate() < birthDate.getDate())) {
                            age--;
                        }

                        ageDisplay.textContent = age >= 0 ? `Age: ${age} years` : '';
                    }
                }

                if (birthdateField) {
                    birthdateField.addEventListener('change', calculateAge);
                    calculateAge(); // Calculate on load if value is set
                }
            });
            </script>
            </div>
<div class="help-text">When did this person join?</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].teams[0].members[0].experience_years">Years of Experience</label>
<input name="departments[0].teams[0].members[0].experience_years" id="departments[0].teams[0].members[0].experience_years" min="0" max="70" step="0.1" placeholder="50.0%" inputmode="numeric" type="number" />
<div class="help-text">Total professional experience in years</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].teams[0].members[0].manager">Manager Name</label>
<input name="departments[0].teams[0].members[0].manager" id="departments[0].teams[0].members[0].manager" placeholder="Direct manager name" type="text" />
<div class="help-text">Who supervises this team member?</div></div>
                </div>
                <div class="col-12">
                    
<div class="model-list-block" data-field-name="departments[0].teams[0].members[0].certifications" data-min-items="0" data-max-items="20">
    <div class="model-list-items" id="departments[0].teams[0].members[0].certifications-items"><template class="model-list-item-template">
        <div class="model-list-item card border mb-3"
             data-index="0"
             data-title-template="{name} - {issuer}"
             data-field-name="departments[0].teams[0].members[0].certifications">
            <div class="card-header d-flex justify-content-between align-items-center">
                <h6 class="mb-0">
                    <button class="btn btn-link text-decoration-none p-0 text-start"
                            type="button"
                            data-bs-toggle="collapse"
                            data-bs-target="#departments_0__teams_0__members_0__certifications_item_0_content"
                            aria-expanded="false"
                            aria-controls="departments_0__teams_0__members_0__certifications_item_0_content">
                        <i class="bi bi-chevron-right me-2"></i>
                        <i class="bi bi-card-list me-2"></i>
                        Item #1
                    </button>
                </h6>
                <button type="button"
                        class="btn btn-outline-danger btn-sm remove-item-btn"
                        data-index="0"
                        data-field-name="departments[0].teams[0].members[0].certifications"
                        title="Remove this item">
                    <i class="bi bi-trash"></i>
                </button>
            </div>
            <div class="collapse collapse show" id="departments_0__teams_0__members_0__certifications_item_0_content">
                <div class="card-body"><div class="row">
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].teams[0].members[0].certifications[0].name">Certification Name</label>
<input name="departments[0].teams[0].members[0].certifications[0].name" id="departments[0].teams[0].members[0].certifications[0].name" maxlength="100" placeholder="e.g., AWS Solutions Architect" type="text" />
<div class="help-text">Name of the certification</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].teams[0].members[0].certifications[0].issuer">Issuing Organization</label>
<input name="departments[0].teams[0].members[0].certifications[0].issuer" id="departments[0].teams[0].members[0].certifications[0].issuer" maxlength="100" placeholder="e.g., Amazon Web Services" type="text" />
<div class="help-text">Organization that issued the certification</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].teams[0].members[0].certifications[0].issue_date">Issue Date</label>
<div class="birthdate-input-group"><input name="departments[0].teams[0].members[0].certifications[0].issue_date" id="departments[0].teams[0].members[0].certifications[0].issue_date" max="2026-03-07" min="1876-01-01" type="date" />
            <div class="age-display" id="departments[0].teams[0].members[0].certifications[0].issue_date_age" style="margin-top: 5px; font-size: 0.9em; color: #666;"></div>
            <script>
            document.addEventListener('DOMContentLoaded', function() {
                const birthdateField = document.getElementById('departments[0].teams[0].members[0].certifications[0].issue_date');
                const ageDisplay = document.getElementById('departments[0].teams[0].members[0].certifications[0].issue_date_age');

                function calculateAge() {
                    if (birthdateField.value && ageDisplay) {
                        const birthDate = new Date(birthdateField.value);
                        const today = new Date();
                        let age = today.getFullYear() - birthDate.getFullYear();
                        const monthDiff = today.getMonth() - birthDate.getMonth();

                        if (monthDiff < 0 || (monthDiff === 0 && today.getDate() < birthDate.getDate())) {
                            age--;
                        }

                        ageDisplay.textContent = age >= 0 ? `Age: ${age} years` : '';
                    }
                }

                if (birthdateField) {
                    birthdateField.addEventListener('change', calculateAge);
                    calculateAge(); // Calculate on load if value is set
                }
            });
            </script>
            </div>
<div class="help-text">When was this certification issued?</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].teams[0].members[0].certifications[0].expiry_date">Expiry Date</label>
<div class="birthdate-input-group"><input name="departments[0].teams[0].members[0].certifications[0].expiry_date" id="departments[0].teams[0].members[0].certifications[0].expiry_date" max="2026-03-07" min="1876-01-01" type="date" />
            <div class="age-display" id="departments[0].teams[0].members[0].certifications[0].expiry_date_age" style="margin-top: 5px; font-size: 0.9em; color: #666;"></div>
            <script>
            document.addEventListener('DOMContentLoaded', function() {
                const birthdateField = document.getElementById('departments[0].teams[0].members[0].certifications[0].expiry_date');
                const ageDisplay = document.getElementById('departments[0].teams[0].members[0].certifications[0].expiry_date_age');

                function calculateAge() {
                    if (birthdateField.value && ageDisplay) {
                        const birthDate = new Date(birthdateField.value);
                        const today = new Date();
                        let age = today.getFullYear() - birthDate.getFullYear();
                        const monthDiff = today.getMonth() - birthDate.getMonth();

                        if (monthDiff < 0 || (monthDiff === 0 && today.getDate() < birthDate.getDate())) {
                            age--;
                        }

                        ageDisplay.textContent = age >= 0 ? `Age: ${age} years` : '';
                    }
                }

                if (birthdateField) {
                    birthdateField.addEventListener('change', calculateAge);
                    calculateAge(); // Calculate on load if value is set
                }
            });
            </script>
            </div>
<div class="help-text">When does this certification expire? (Leave empty if no expiry)</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].teams[0].members[0].certifications[0].credential_id">Credential ID</label>
<input name="departments[0].teams[0].members[0].certifications[0].credential_id" id="departments[0].teams[0].members[0].certifications[0].credential_id" placeholder="Optional credential identifier" type="text" />
<div class="help-text">Unique ID for credential verification</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].teams[0].members[0].certifications[0].credential_url">Credential URL</label>
<input name="departments[0].teams[0].members[0].certifications[0].credential_url" id="departments[0].teams[0].members[0].certifications[0].credential_url" placeholder="https://..." type="text" />
<div class="help-text">Link to verify the credential</div></div>
                </div></div>
                </div>
            </div>
        </div></template>
        <div class="model-list-item card border mb-3"
             data-index="0"
             data-title-template="{name} - {issuer}"
             data-field-name="departments[0].teams[0].members[0].certifications">
            <div class="card-header d-flex justify-content-between align-items-center">
                <h6 class="mb-0">
                    <button class="btn btn-link text-decoration-none p-0 text-start"
                            type="button"
                            data-bs-toggle="collapse"
                            data-bs-target="#departments_0__teams_0__members_0__certifications_item_0_content"
                            aria-expanded="false"
                            aria-controls="departments_0__teams_0__members_0__certifications_item_0_content">
                        <i class="bi bi-chevron-right me-2"></i>
                        <i class="bi bi-card-list me-2"></i>
                        Item #1
                    </button>
                </h6>
                <button type="button"
                        class="btn btn-outline-danger btn-sm remove-item-btn"
                        data-index="0"
                        data-field-name="departments[0].teams[0].members[0].certifications"
                        title="Remove this item">
                    <i class="bi bi-trash"></i>
                </button>
            </div>
            <div class="collapse collapse show" id="departments_0__teams_0__members_0__certifications_item_0_content">
                <div class="card-body"><div class="row">
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].teams[0].members[0].certifications[0].name">Certification Name</label>
<input name="departments[0].teams[0].members[0].certifications[0].name" id="departments[0].teams[0].members[0].certifications[0].name" maxlength="100" placeholder="e.g., AWS Solutions Architect" type="text" />
<div class="help-text">Name of the certification</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].teams[0].members[0].certifications[0].issuer">Issuing Organization</label>
<input name="departments[0].teams[0].members[0].certifications[0].issuer" id="departments[0].teams[0].members[0].certifications[0].issuer" maxlength="100" placeholder="e.g., Amazon Web Services" type="text" />
<div class="help-text">Organization that issued the certification</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].teams[0].members[0].certifications[0].issue_date">Issue Date</label>
<div class="birthdate-input-group"><input name="departments[0].teams[0].members[0].certifications[0].issue_date" id="departments[0].teams[0].members[0].certifications[0].issue_date" max="2026-03-07" min="1876-01-01" type="date" />
            <div class="age-display" id="departments[0].teams[0].members[0].certifications[0].issue_date_age" style="margin-top: 5px; font-size: 0.9em; color: #666;"></div>
            <script>
            document.addEventListener('DOMContentLoaded', function() {
                const birthdateField = document.getElementById('departments[0].teams[0].members[0].certifications[0].issue_date');
                const ageDisplay = document.getElementById('departments[0].teams[0].members[0].certifications[0].issue_date_age');

                function calculateAge() {
                    if (birthdateField.value && ageDisplay) {
                        const birthDate = new Date(birthdateField.value);
                        const today = new Date();
                        let age = today.getFullYear() - birthDate.getFullYear();
                        const monthDiff = today.getMonth() - birthDate.getMonth();

                        if (monthDiff < 0 || (monthDiff === 0 && today.getDate() < birthDate.getDate())) {
                            age--;
                        }

                        ageDisplay.textContent = age >= 0 ? `Age: ${age} years` : '';
                    }
                }

                if (birthdateField) {
                    birthdateField.addEventListener('change', calculateAge);
                    calculateAge(); // Calculate on load if value is set
                }
            });
            </script>
            </div>
<div class="help-text">When was this certification issued?</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].teams[0].members[0].certifications[0].expiry_date">Expiry Date</label>
<div class="birthdate-input-group"><input name="departments[0].teams[0].members[0].certifications[0].expiry_date" id="departments[0].teams[0].members[0].certifications[0].expiry_date" max="2026-03-07" min="1876-01-01" type="date" />
            <div class="age-display" id="departments[0].teams[0].members[0].certifications[0].expiry_date_age" style="margin-top: 5px; font-size: 0.9em; color: #666;"></div>
            <script>
            document.addEventListener('DOMContentLoaded', function() {
                const birthdateField = document.getElementById('departments[0].teams[0].members[0].certifications[0].expiry_date');
                const ageDisplay = document.getElementById('departments[0].teams[0].members[0].certifications[0].expiry_date_age');

                function calculateAge() {
                    if (birthdateField.value && ageDisplay) {
                        const birthDate = new Date(birthdateField.value);
                        const today = new Date();
                        let age = today.getFullYear() - birthDate.getFullYear();
                        const monthDiff = today.getMonth() - birthDate.getMonth();

                        if (monthDiff < 0 || (monthDiff === 0 && today.getDate() < birthDate.getDate())) {
                            age--;
                        }

                        ageDisplay.textContent = age >= 0 ? `Age: ${age} years` : '';
                    }
                }

                if (birthdateField) {
                    birthdateField.addEventListener('change', calculateAge);
                    calculateAge(); // Calculate on load if value is set
                }
            });
            </script>
            </div>
<div class="help-text">When does this certification expire? (Leave empty if no expiry)</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].teams[0].members[0].certifications[0].credential_id">Credential ID</label>
<input name="departments[0].teams[0].members[0].certifications[0].credential_id" id="departments[0].teams[0].members[0].certifications[0].credential_id" placeholder="Optional credential identifier" type="text" />
<div class="help-text">Unique ID for credential verification</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].teams[0].members[0].certifications[0].credential_url">Credential URL</label>
<input name="departments[0].teams[0].members[0].certifications[0].credential_url" id="departments[0].teams[0].members[0].certifications[0].credential_url" placeholder="https://..." type="text" />
<div class="help-text">Link to verify the credential</div></div>
                </div></div>
                </div>
            </div>
        </div></div>
    <button type="button" class="add-item-btn" data-target="departments[0].teams[0].members[0].certifications">Add Item</button>
    
<div class="model-list-help">Professional certifications and credentials</div>

    
</div>

                </div></div>
                </div>
            </div>
        </div></template>
        <div class="model-list-item card border mb-3"
             data-index="0"
             data-title-template="πŸ‘€ {name} - {role}"
             data-field-name="departments[0].teams[0].members">
            <div class="card-header d-flex justify-content-between align-items-center">
                <h6 class="mb-0">
                    <button class="btn btn-link text-decoration-none p-0 text-start"
                            type="button"
                            data-bs-toggle="collapse"
                            data-bs-target="#departments_0__teams_0__members_item_0_content"
                            aria-expanded="false"
                            aria-controls="departments_0__teams_0__members_item_0_content">
                        <i class="bi bi-chevron-right me-2"></i>
                        <i class="bi bi-card-list me-2"></i>
                        πŸ‘€ Bob Wilson - Senior Backend Developer
                    </button>
                </h6>
                <button type="button"
                        class="btn btn-outline-danger btn-sm remove-item-btn"
                        data-index="0"
                        data-field-name="departments[0].teams[0].members"
                        title="Remove this item">
                    <i class="bi bi-trash"></i>
                </button>
            </div>
            <div class="collapse collapse show" id="departments_0__teams_0__members_item_0_content">
                <div class="card-body"><div class="row">
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].teams[0].members[0].name">Member Name</label>
<input name="departments[0].teams[0].members[0].name" id="departments[0].teams[0].members[0].name" value="Bob Wilson" minlength="2" maxlength="100" placeholder="Enter full name" type="text" />
<div class="help-text">Full name of the team member</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].teams[0].members[0].email">Email Address</label>
<input name="departments[0].teams[0].members[0].email" id="departments[0].teams[0].members[0].email" value="bob.wilson@techcorp.com" placeholder="member@company.com" inputmode="email" type="email" />
<div class="help-text">Contact email address</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].teams[0].members[0].role">Role</label>
<input name="departments[0].teams[0].members[0].role" id="departments[0].teams[0].members[0].role" value="Senior Backend Developer" maxlength="100" placeholder="e.g., Senior Developer" type="text" />
<div class="help-text">Job title or role</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].teams[0].members[0].hire_date">Hire Date</label>
<div class="birthdate-input-group"><input name="departments[0].teams[0].members[0].hire_date" id="departments[0].teams[0].members[0].hire_date" value="2016-01-15" max="2026-03-07" min="1876-01-01" type="date" />
            <div class="age-display" id="departments[0].teams[0].members[0].hire_date_age" style="margin-top: 5px; font-size: 0.9em; color: #666;"></div>
            <script>
            document.addEventListener('DOMContentLoaded', function() {
                const birthdateField = document.getElementById('departments[0].teams[0].members[0].hire_date');
                const ageDisplay = document.getElementById('departments[0].teams[0].members[0].hire_date_age');

                function calculateAge() {
                    if (birthdateField.value && ageDisplay) {
                        const birthDate = new Date(birthdateField.value);
                        const today = new Date();
                        let age = today.getFullYear() - birthDate.getFullYear();
                        const monthDiff = today.getMonth() - birthDate.getMonth();

                        if (monthDiff < 0 || (monthDiff === 0 && today.getDate() < birthDate.getDate())) {
                            age--;
                        }

                        ageDisplay.textContent = age >= 0 ? `Age: ${age} years` : '';
                    }
                }

                if (birthdateField) {
                    birthdateField.addEventListener('change', calculateAge);
                    calculateAge(); // Calculate on load if value is set
                }
            });
            </script>
            </div>
<div class="help-text">When did this person join?</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].teams[0].members[0].experience_years">Years of Experience</label>
<input name="departments[0].teams[0].members[0].experience_years" id="departments[0].teams[0].members[0].experience_years" value="12" min="0" max="70" step="0.1" placeholder="50.0%" inputmode="numeric" type="number" />
<div class="help-text">Total professional experience in years</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].teams[0].members[0].manager">Manager Name</label>
<input name="departments[0].teams[0].members[0].manager" id="departments[0].teams[0].members[0].manager" value="Alice Johnson" placeholder="Direct manager name" type="text" />
<div class="help-text">Who supervises this team member?</div></div>
                </div>
                <div class="col-12">
                    
<div class="model-list-block" data-field-name="departments[0].teams[0].members[0].certifications" data-min-items="0" data-max-items="20">
    <div class="model-list-items" id="departments[0].teams[0].members[0].certifications-items"><template class="model-list-item-template">
        <div class="model-list-item card border mb-3"
             data-index="0"
             data-title-template="{name} - {issuer}"
             data-field-name="departments[0].teams[0].members[0].certifications">
            <div class="card-header d-flex justify-content-between align-items-center">
                <h6 class="mb-0">
                    <button class="btn btn-link text-decoration-none p-0 text-start"
                            type="button"
                            data-bs-toggle="collapse"
                            data-bs-target="#departments_0__teams_0__members_0__certifications_item_0_content"
                            aria-expanded="false"
                            aria-controls="departments_0__teams_0__members_0__certifications_item_0_content">
                        <i class="bi bi-chevron-right me-2"></i>
                        <i class="bi bi-card-list me-2"></i>
                        Item #1
                    </button>
                </h6>
                <button type="button"
                        class="btn btn-outline-danger btn-sm remove-item-btn"
                        data-index="0"
                        data-field-name="departments[0].teams[0].members[0].certifications"
                        title="Remove this item">
                    <i class="bi bi-trash"></i>
                </button>
            </div>
            <div class="collapse collapse show" id="departments_0__teams_0__members_0__certifications_item_0_content">
                <div class="card-body"><div class="row">
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].teams[0].members[0].certifications[0].name">Certification Name</label>
<input name="departments[0].teams[0].members[0].certifications[0].name" id="departments[0].teams[0].members[0].certifications[0].name" maxlength="100" placeholder="e.g., AWS Solutions Architect" type="text" />
<div class="help-text">Name of the certification</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].teams[0].members[0].certifications[0].issuer">Issuing Organization</label>
<input name="departments[0].teams[0].members[0].certifications[0].issuer" id="departments[0].teams[0].members[0].certifications[0].issuer" maxlength="100" placeholder="e.g., Amazon Web Services" type="text" />
<div class="help-text">Organization that issued the certification</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].teams[0].members[0].certifications[0].issue_date">Issue Date</label>
<div class="birthdate-input-group"><input name="departments[0].teams[0].members[0].certifications[0].issue_date" id="departments[0].teams[0].members[0].certifications[0].issue_date" max="2026-03-07" min="1876-01-01" type="date" />
            <div class="age-display" id="departments[0].teams[0].members[0].certifications[0].issue_date_age" style="margin-top: 5px; font-size: 0.9em; color: #666;"></div>
            <script>
            document.addEventListener('DOMContentLoaded', function() {
                const birthdateField = document.getElementById('departments[0].teams[0].members[0].certifications[0].issue_date');
                const ageDisplay = document.getElementById('departments[0].teams[0].members[0].certifications[0].issue_date_age');

                function calculateAge() {
                    if (birthdateField.value && ageDisplay) {
                        const birthDate = new Date(birthdateField.value);
                        const today = new Date();
                        let age = today.getFullYear() - birthDate.getFullYear();
                        const monthDiff = today.getMonth() - birthDate.getMonth();

                        if (monthDiff < 0 || (monthDiff === 0 && today.getDate() < birthDate.getDate())) {
                            age--;
                        }

                        ageDisplay.textContent = age >= 0 ? `Age: ${age} years` : '';
                    }
                }

                if (birthdateField) {
                    birthdateField.addEventListener('change', calculateAge);
                    calculateAge(); // Calculate on load if value is set
                }
            });
            </script>
            </div>
<div class="help-text">When was this certification issued?</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].teams[0].members[0].certifications[0].expiry_date">Expiry Date</label>
<div class="birthdate-input-group"><input name="departments[0].teams[0].members[0].certifications[0].expiry_date" id="departments[0].teams[0].members[0].certifications[0].expiry_date" max="2026-03-07" min="1876-01-01" type="date" />
            <div class="age-display" id="departments[0].teams[0].members[0].certifications[0].expiry_date_age" style="margin-top: 5px; font-size: 0.9em; color: #666;"></div>
            <script>
            document.addEventListener('DOMContentLoaded', function() {
                const birthdateField = document.getElementById('departments[0].teams[0].members[0].certifications[0].expiry_date');
                const ageDisplay = document.getElementById('departments[0].teams[0].members[0].certifications[0].expiry_date_age');

                function calculateAge() {
                    if (birthdateField.value && ageDisplay) {
                        const birthDate = new Date(birthdateField.value);
                        const today = new Date();
                        let age = today.getFullYear() - birthDate.getFullYear();
                        const monthDiff = today.getMonth() - birthDate.getMonth();

                        if (monthDiff < 0 || (monthDiff === 0 && today.getDate() < birthDate.getDate())) {
                            age--;
                        }

                        ageDisplay.textContent = age >= 0 ? `Age: ${age} years` : '';
                    }
                }

                if (birthdateField) {
                    birthdateField.addEventListener('change', calculateAge);
                    calculateAge(); // Calculate on load if value is set
                }
            });
            </script>
            </div>
<div class="help-text">When does this certification expire? (Leave empty if no expiry)</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].teams[0].members[0].certifications[0].credential_id">Credential ID</label>
<input name="departments[0].teams[0].members[0].certifications[0].credential_id" id="departments[0].teams[0].members[0].certifications[0].credential_id" placeholder="Optional credential identifier" type="text" />
<div class="help-text">Unique ID for credential verification</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].teams[0].members[0].certifications[0].credential_url">Credential URL</label>
<input name="departments[0].teams[0].members[0].certifications[0].credential_url" id="departments[0].teams[0].members[0].certifications[0].credential_url" placeholder="https://..." type="text" />
<div class="help-text">Link to verify the credential</div></div>
                </div></div>
                </div>
            </div>
        </div></template>
        <div class="model-list-item card border mb-3"
             data-index="0"
             data-title-template="{name} - {issuer}"
             data-field-name="departments[0].teams[0].members[0].certifications">
            <div class="card-header d-flex justify-content-between align-items-center">
                <h6 class="mb-0">
                    <button class="btn btn-link text-decoration-none p-0 text-start"
                            type="button"
                            data-bs-toggle="collapse"
                            data-bs-target="#departments_0__teams_0__members_0__certifications_item_0_content"
                            aria-expanded="false"
                            aria-controls="departments_0__teams_0__members_0__certifications_item_0_content">
                        <i class="bi bi-chevron-right me-2"></i>
                        <i class="bi bi-card-list me-2"></i>
                        AWS Solutions Architect Professional - Amazon Web Services
                    </button>
                </h6>
                <button type="button"
                        class="btn btn-outline-danger btn-sm remove-item-btn"
                        data-index="0"
                        data-field-name="departments[0].teams[0].members[0].certifications"
                        title="Remove this item">
                    <i class="bi bi-trash"></i>
                </button>
            </div>
            <div class="collapse collapse show" id="departments_0__teams_0__members_0__certifications_item_0_content">
                <div class="card-body"><div class="row">
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].teams[0].members[0].certifications[0].name">Certification Name</label>
<input name="departments[0].teams[0].members[0].certifications[0].name" id="departments[0].teams[0].members[0].certifications[0].name" value="AWS Solutions Architect Professional" maxlength="100" placeholder="e.g., AWS Solutions Architect" type="text" />
<div class="help-text">Name of the certification</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].teams[0].members[0].certifications[0].issuer">Issuing Organization</label>
<input name="departments[0].teams[0].members[0].certifications[0].issuer" id="departments[0].teams[0].members[0].certifications[0].issuer" value="Amazon Web Services" maxlength="100" placeholder="e.g., Amazon Web Services" type="text" />
<div class="help-text">Organization that issued the certification</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].teams[0].members[0].certifications[0].issue_date">Issue Date</label>
<div class="birthdate-input-group"><input name="departments[0].teams[0].members[0].certifications[0].issue_date" id="departments[0].teams[0].members[0].certifications[0].issue_date" value="2022-05-01" max="2026-03-07" min="1876-01-01" type="date" />
            <div class="age-display" id="departments[0].teams[0].members[0].certifications[0].issue_date_age" style="margin-top: 5px; font-size: 0.9em; color: #666;"></div>
            <script>
            document.addEventListener('DOMContentLoaded', function() {
                const birthdateField = document.getElementById('departments[0].teams[0].members[0].certifications[0].issue_date');
                const ageDisplay = document.getElementById('departments[0].teams[0].members[0].certifications[0].issue_date_age');

                function calculateAge() {
                    if (birthdateField.value && ageDisplay) {
                        const birthDate = new Date(birthdateField.value);
                        const today = new Date();
                        let age = today.getFullYear() - birthDate.getFullYear();
                        const monthDiff = today.getMonth() - birthDate.getMonth();

                        if (monthDiff < 0 || (monthDiff === 0 && today.getDate() < birthDate.getDate())) {
                            age--;
                        }

                        ageDisplay.textContent = age >= 0 ? `Age: ${age} years` : '';
                    }
                }

                if (birthdateField) {
                    birthdateField.addEventListener('change', calculateAge);
                    calculateAge(); // Calculate on load if value is set
                }
            });
            </script>
            </div>
<div class="help-text">When was this certification issued?</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].teams[0].members[0].certifications[0].expiry_date">Expiry Date</label>
<div class="birthdate-input-group"><input name="departments[0].teams[0].members[0].certifications[0].expiry_date" id="departments[0].teams[0].members[0].certifications[0].expiry_date" value="2025-05-01" max="2026-03-07" min="1876-01-01" type="date" />
            <div class="age-display" id="departments[0].teams[0].members[0].certifications[0].expiry_date_age" style="margin-top: 5px; font-size: 0.9em; color: #666;"></div>
            <script>
            document.addEventListener('DOMContentLoaded', function() {
                const birthdateField = document.getElementById('departments[0].teams[0].members[0].certifications[0].expiry_date');
                const ageDisplay = document.getElementById('departments[0].teams[0].members[0].certifications[0].expiry_date_age');

                function calculateAge() {
                    if (birthdateField.value && ageDisplay) {
                        const birthDate = new Date(birthdateField.value);
                        const today = new Date();
                        let age = today.getFullYear() - birthDate.getFullYear();
                        const monthDiff = today.getMonth() - birthDate.getMonth();

                        if (monthDiff < 0 || (monthDiff === 0 && today.getDate() < birthDate.getDate())) {
                            age--;
                        }

                        ageDisplay.textContent = age >= 0 ? `Age: ${age} years` : '';
                    }
                }

                if (birthdateField) {
                    birthdateField.addEventListener('change', calculateAge);
                    calculateAge(); // Calculate on load if value is set
                }
            });
            </script>
            </div>
<div class="help-text">When does this certification expire? (Leave empty if no expiry)</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].teams[0].members[0].certifications[0].credential_id">Credential ID</label>
<input name="departments[0].teams[0].members[0].certifications[0].credential_id" id="departments[0].teams[0].members[0].certifications[0].credential_id" value="AWS-12345" placeholder="Optional credential identifier" type="text" />
<div class="help-text">Unique ID for credential verification</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].teams[0].members[0].certifications[0].credential_url">Credential URL</label>
<input name="departments[0].teams[0].members[0].certifications[0].credential_url" id="departments[0].teams[0].members[0].certifications[0].credential_url" value="https://aws.amazon.com/verification/12345" placeholder="https://..." type="text" />
<div class="help-text">Link to verify the credential</div></div>
                </div></div>
                </div>
            </div>
        </div>
        <div class="model-list-item card border mb-3"
             data-index="1"
             data-title-template="{name} - {issuer}"
             data-field-name="departments[0].teams[0].members[0].certifications">
            <div class="card-header d-flex justify-content-between align-items-center">
                <h6 class="mb-0">
                    <button class="btn btn-link text-decoration-none p-0 text-start"
                            type="button"
                            data-bs-toggle="collapse"
                            data-bs-target="#departments_0__teams_0__members_0__certifications_item_1_content"
                            aria-expanded="false"
                            aria-controls="departments_0__teams_0__members_0__certifications_item_1_content">
                        <i class="bi bi-chevron-right me-2"></i>
                        <i class="bi bi-card-list me-2"></i>
                        Certified Kubernetes Administrator - Cloud Native Computing Foundation
                    </button>
                </h6>
                <button type="button"
                        class="btn btn-outline-danger btn-sm remove-item-btn"
                        data-index="1"
                        data-field-name="departments[0].teams[0].members[0].certifications"
                        title="Remove this item">
                    <i class="bi bi-trash"></i>
                </button>
            </div>
            <div class="collapse collapse show" id="departments_0__teams_0__members_0__certifications_item_1_content">
                <div class="card-body"><div class="row">
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].teams[0].members[0].certifications[1].name">Certification Name</label>
<input name="departments[0].teams[0].members[0].certifications[1].name" id="departments[0].teams[0].members[0].certifications[1].name" value="Certified Kubernetes Administrator" maxlength="100" placeholder="e.g., AWS Solutions Architect" type="text" />
<div class="help-text">Name of the certification</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].teams[0].members[0].certifications[1].issuer">Issuing Organization</label>
<input name="departments[0].teams[0].members[0].certifications[1].issuer" id="departments[0].teams[0].members[0].certifications[1].issuer" value="Cloud Native Computing Foundation" maxlength="100" placeholder="e.g., Amazon Web Services" type="text" />
<div class="help-text">Organization that issued the certification</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].teams[0].members[0].certifications[1].issue_date">Issue Date</label>
<div class="birthdate-input-group"><input name="departments[0].teams[0].members[0].certifications[1].issue_date" id="departments[0].teams[0].members[0].certifications[1].issue_date" value="2023-01-15" max="2026-03-07" min="1876-01-01" type="date" />
            <div class="age-display" id="departments[0].teams[0].members[0].certifications[1].issue_date_age" style="margin-top: 5px; font-size: 0.9em; color: #666;"></div>
            <script>
            document.addEventListener('DOMContentLoaded', function() {
                const birthdateField = document.getElementById('departments[0].teams[0].members[0].certifications[1].issue_date');
                const ageDisplay = document.getElementById('departments[0].teams[0].members[0].certifications[1].issue_date_age');

                function calculateAge() {
                    if (birthdateField.value && ageDisplay) {
                        const birthDate = new Date(birthdateField.value);
                        const today = new Date();
                        let age = today.getFullYear() - birthDate.getFullYear();
                        const monthDiff = today.getMonth() - birthDate.getMonth();

                        if (monthDiff < 0 || (monthDiff === 0 && today.getDate() < birthDate.getDate())) {
                            age--;
                        }

                        ageDisplay.textContent = age >= 0 ? `Age: ${age} years` : '';
                    }
                }

                if (birthdateField) {
                    birthdateField.addEventListener('change', calculateAge);
                    calculateAge(); // Calculate on load if value is set
                }
            });
            </script>
            </div>
<div class="help-text">When was this certification issued?</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].teams[0].members[0].certifications[1].expiry_date">Expiry Date</label>
<div class="birthdate-input-group"><input name="departments[0].teams[0].members[0].certifications[1].expiry_date" id="departments[0].teams[0].members[0].certifications[1].expiry_date" value="2026-01-15" max="2026-03-07" min="1876-01-01" type="date" />
            <div class="age-display" id="departments[0].teams[0].members[0].certifications[1].expiry_date_age" style="margin-top: 5px; font-size: 0.9em; color: #666;"></div>
            <script>
            document.addEventListener('DOMContentLoaded', function() {
                const birthdateField = document.getElementById('departments[0].teams[0].members[0].certifications[1].expiry_date');
                const ageDisplay = document.getElementById('departments[0].teams[0].members[0].certifications[1].expiry_date_age');

                function calculateAge() {
                    if (birthdateField.value && ageDisplay) {
                        const birthDate = new Date(birthdateField.value);
                        const today = new Date();
                        let age = today.getFullYear() - birthDate.getFullYear();
                        const monthDiff = today.getMonth() - birthDate.getMonth();

                        if (monthDiff < 0 || (monthDiff === 0 && today.getDate() < birthDate.getDate())) {
                            age--;
                        }

                        ageDisplay.textContent = age >= 0 ? `Age: ${age} years` : '';
                    }
                }

                if (birthdateField) {
                    birthdateField.addEventListener('change', calculateAge);
                    calculateAge(); // Calculate on load if value is set
                }
            });
            </script>
            </div>
<div class="help-text">When does this certification expire? (Leave empty if no expiry)</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].teams[0].members[0].certifications[1].credential_id">Credential ID</label>
<input name="departments[0].teams[0].members[0].certifications[1].credential_id" id="departments[0].teams[0].members[0].certifications[1].credential_id" value="CKA-67890" placeholder="Optional credential identifier" type="text" />
<div class="help-text">Unique ID for credential verification</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].teams[0].members[0].certifications[1].credential_url">Credential URL</label>
<input name="departments[0].teams[0].members[0].certifications[1].credential_url" id="departments[0].teams[0].members[0].certifications[1].credential_url" value="https://cncf.io/verify/67890" placeholder="https://..." type="text" />
<div class="help-text">Link to verify the credential</div></div>
                </div></div>
                </div>
            </div>
        </div></div>
    <button type="button" class="add-item-btn" data-target="departments[0].teams[0].members[0].certifications">Add Item</button>
    
<div class="model-list-help">Professional certifications and credentials</div>

    
</div>

                </div></div>
                </div>
            </div>
        </div></div>
    <button type="button" class="add-item-btn" data-target="departments[0].teams[0].members">Add Item</button>
    
<div class="model-list-help">Add team members and their certifications</div>

    
</div>

                </div></div>
                </div>
            </div>
        </div></div>
    <button type="button" class="add-item-btn" data-target="departments[0].teams">Add Item</button>
    
<div class="model-list-help">Teams within this department and their members</div>

    
</div>

                </div>
                <div class="col-12">
                    
<div class="model-list-block" data-field-name="departments[0].projects" data-min-items="0" data-max-items="100">
    <div class="model-list-items" id="departments[0].projects-items"><template class="model-list-item-template">
        <div class="model-list-item card border mb-3"
             data-index="0"
             data-title-template="πŸš€ {name}"
             data-field-name="departments[0].projects">
            <div class="card-header d-flex justify-content-between align-items-center">
                <h6 class="mb-0">
                    <button class="btn btn-link text-decoration-none p-0 text-start"
                            type="button"
                            data-bs-toggle="collapse"
                            data-bs-target="#departments_0__projects_item_0_content"
                            aria-expanded="false"
                            aria-controls="departments_0__projects_item_0_content">
                        <i class="bi bi-chevron-right me-2"></i>
                        <i class="bi bi-card-list me-2"></i>
                        Item #1
                    </button>
                </h6>
                <button type="button"
                        class="btn btn-outline-danger btn-sm remove-item-btn"
                        data-index="0"
                        data-field-name="departments[0].projects"
                        title="Remove this item">
                    <i class="bi bi-trash"></i>
                </button>
            </div>
            <div class="collapse collapse show" id="departments_0__projects_item_0_content">
                <div class="card-body"><div class="row">
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].projects[0].name">Project Name</label>
<input name="departments[0].projects[0].name" id="departments[0].projects[0].name" minlength="3" maxlength="200" placeholder="e.g., Mobile App Redesign" type="text" />
<div class="help-text">Name of the project</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].projects[0].description">Project Description</label>
<textarea name="departments[0].projects[0].description" id="departments[0].projects[0].description" maxlength="2000" placeholder="Detailed description of the project"></textarea>
<div class="help-text">What is this project about?</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><div class="field">
<label for="departments[0].projects[0].status">Project Status</label>
<div class="input-with-icon"><span class="input-icon">flag</span>
<select name="departments[0].projects[0].status" id="departments[0].projects[0].status"><option value="planning">πŸ“‹ Planning</option>
<option value="in_progress">πŸš€ In Progress</option>
<option value="on_hold">⏸️ On Hold</option>
<option value="completed">βœ… Completed</option>
<option value="archived">πŸ“¦ Archived</option></select>
</div>
<div class="help-text">Current project status</div>
</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].projects[0].start_date">Project Start Date</label>
<div class="birthdate-input-group"><input name="departments[0].projects[0].start_date" id="departments[0].projects[0].start_date" max="2026-03-07" min="1876-01-01" type="date" />
            <div class="age-display" id="departments[0].projects[0].start_date_age" style="margin-top: 5px; font-size: 0.9em; color: #666;"></div>
            <script>
            document.addEventListener('DOMContentLoaded', function() {
                const birthdateField = document.getElementById('departments[0].projects[0].start_date');
                const ageDisplay = document.getElementById('departments[0].projects[0].start_date_age');

                function calculateAge() {
                    if (birthdateField.value && ageDisplay) {
                        const birthDate = new Date(birthdateField.value);
                        const today = new Date();
                        let age = today.getFullYear() - birthDate.getFullYear();
                        const monthDiff = today.getMonth() - birthDate.getMonth();

                        if (monthDiff < 0 || (monthDiff === 0 && today.getDate() < birthDate.getDate())) {
                            age--;
                        }

                        ageDisplay.textContent = age >= 0 ? `Age: ${age} years` : '';
                    }
                }

                if (birthdateField) {
                    birthdateField.addEventListener('change', calculateAge);
                    calculateAge(); // Calculate on load if value is set
                }
            });
            </script>
            </div>
<div class="help-text">When does this project start?</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].projects[0].target_end_date">Target End Date</label>
<div class="birthdate-input-group"><input name="departments[0].projects[0].target_end_date" id="departments[0].projects[0].target_end_date" max="2026-03-07" min="1876-01-01" type="date" />
            <div class="age-display" id="departments[0].projects[0].target_end_date_age" style="margin-top: 5px; font-size: 0.9em; color: #666;"></div>
            <script>
            document.addEventListener('DOMContentLoaded', function() {
                const birthdateField = document.getElementById('departments[0].projects[0].target_end_date');
                const ageDisplay = document.getElementById('departments[0].projects[0].target_end_date_age');

                function calculateAge() {
                    if (birthdateField.value && ageDisplay) {
                        const birthDate = new Date(birthdateField.value);
                        const today = new Date();
                        let age = today.getFullYear() - birthDate.getFullYear();
                        const monthDiff = today.getMonth() - birthDate.getMonth();

                        if (monthDiff < 0 || (monthDiff === 0 && today.getDate() < birthDate.getDate())) {
                            age--;
                        }

                        ageDisplay.textContent = age >= 0 ? `Age: ${age} years` : '';
                    }
                }

                if (birthdateField) {
                    birthdateField.addEventListener('change', calculateAge);
                    calculateAge(); // Calculate on load if value is set
                }
            });
            </script>
            </div>
<div class="help-text">When should this project be completed?</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].projects[0].budget">Budget ($)</label>
<input name="departments[0].projects[0].budget" id="departments[0].projects[0].budget" min="0" max="100" step="0.1" placeholder="50.0%" inputmode="numeric" type="number" />
<div class="help-text">Project budget in USD</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].projects[0].project_manager">Project Manager</label>
<input name="departments[0].projects[0].project_manager" id="departments[0].projects[0].project_manager" maxlength="100" placeholder="PM name" type="text" />
<div class="help-text">Who is managing this project?</div></div>
                </div>
                <div class="col-12">
                    
<div class="model-list-block" data-field-name="departments[0].projects[0].tasks" data-min-items="1" data-max-items="200">
    <div class="model-list-items" id="departments[0].projects[0].tasks-items"><template class="model-list-item-template">
        <div class="model-list-item card border mb-3"
             data-index="0"
             data-title-template="πŸ“‹ {title}"
             data-field-name="departments[0].projects[0].tasks">
            <div class="card-header d-flex justify-content-between align-items-center">
                <h6 class="mb-0">
                    <button class="btn btn-link text-decoration-none p-0 text-start"
                            type="button"
                            data-bs-toggle="collapse"
                            data-bs-target="#departments_0__projects_0__tasks_item_0_content"
                            aria-expanded="false"
                            aria-controls="departments_0__projects_0__tasks_item_0_content">
                        <i class="bi bi-chevron-right me-2"></i>
                        <i class="bi bi-card-list me-2"></i>
                        Item #1
                    </button>
                </h6>
                <button type="button"
                        class="btn btn-outline-danger btn-sm remove-item-btn"
                        data-index="0"
                        data-field-name="departments[0].projects[0].tasks"
                        title="Remove this item">
                    <i class="bi bi-trash"></i>
                </button>
            </div>
            <div class="collapse collapse show" id="departments_0__projects_0__tasks_item_0_content">
                <div class="card-body"><div class="row">
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].projects[0].tasks[0].title">Task Title</label>
<input name="departments[0].projects[0].tasks[0].title" id="departments[0].projects[0].tasks[0].title" minlength="3" maxlength="200" placeholder="Brief task name" type="text" />
<div class="help-text">What is this task?</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].projects[0].tasks[0].description">Task Description</label>
<textarea name="departments[0].projects[0].tasks[0].description" id="departments[0].projects[0].tasks[0].description" maxlength="2000" placeholder="Detailed description of the task"></textarea>
<div class="help-text">Full description of what needs to be done</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><div class="field">
<label for="departments[0].projects[0].tasks[0].priority">Priority Level</label>
<div class="input-with-icon"><span class="input-icon">exclamation-circle</span>
<select name="departments[0].projects[0].tasks[0].priority" id="departments[0].projects[0].tasks[0].priority"><option value="low">🟒 Low</option>
<option value="medium">🟑 Medium</option>
<option value="high">πŸ”΄ High</option>
<option value="critical">β›” Critical</option></select>
</div>
<div class="help-text">Task priority level</div>
</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><div class="field">
<label for="departments[0].projects[0].tasks[0].status">Task Status</label>
<select name="departments[0].projects[0].tasks[0].status" id="departments[0].projects[0].tasks[0].status"><option value="planning">πŸ“‹ Planning</option>
<option value="in_progress">πŸ”„ In Progress</option>
<option value="in_review">πŸ‘€ In Review</option>
<option value="completed">βœ… Completed</option>
<option value="cancelled">❌ Cancelled</option></select>
<div class="help-text">Current task status</div>
</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].projects[0].tasks[0].start_date">Start Date</label>
<div class="birthdate-input-group"><input name="departments[0].projects[0].tasks[0].start_date" id="departments[0].projects[0].tasks[0].start_date" max="2026-03-07" min="1876-01-01" type="date" />
            <div class="age-display" id="departments[0].projects[0].tasks[0].start_date_age" style="margin-top: 5px; font-size: 0.9em; color: #666;"></div>
            <script>
            document.addEventListener('DOMContentLoaded', function() {
                const birthdateField = document.getElementById('departments[0].projects[0].tasks[0].start_date');
                const ageDisplay = document.getElementById('departments[0].projects[0].tasks[0].start_date_age');

                function calculateAge() {
                    if (birthdateField.value && ageDisplay) {
                        const birthDate = new Date(birthdateField.value);
                        const today = new Date();
                        let age = today.getFullYear() - birthDate.getFullYear();
                        const monthDiff = today.getMonth() - birthDate.getMonth();

                        if (monthDiff < 0 || (monthDiff === 0 && today.getDate() < birthDate.getDate())) {
                            age--;
                        }

                        ageDisplay.textContent = age >= 0 ? `Age: ${age} years` : '';
                    }
                }

                if (birthdateField) {
                    birthdateField.addEventListener('change', calculateAge);
                    calculateAge(); // Calculate on load if value is set
                }
            });
            </script>
            </div>
<div class="help-text">When should this task start?</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].projects[0].tasks[0].due_date">Due Date</label>
<div class="birthdate-input-group"><input name="departments[0].projects[0].tasks[0].due_date" id="departments[0].projects[0].tasks[0].due_date" max="2026-03-07" min="1876-01-01" type="date" />
            <div class="age-display" id="departments[0].projects[0].tasks[0].due_date_age" style="margin-top: 5px; font-size: 0.9em; color: #666;"></div>
            <script>
            document.addEventListener('DOMContentLoaded', function() {
                const birthdateField = document.getElementById('departments[0].projects[0].tasks[0].due_date');
                const ageDisplay = document.getElementById('departments[0].projects[0].tasks[0].due_date_age');

                function calculateAge() {
                    if (birthdateField.value && ageDisplay) {
                        const birthDate = new Date(birthdateField.value);
                        const today = new Date();
                        let age = today.getFullYear() - birthDate.getFullYear();
                        const monthDiff = today.getMonth() - birthDate.getMonth();

                        if (monthDiff < 0 || (monthDiff === 0 && today.getDate() < birthDate.getDate())) {
                            age--;
                        }

                        ageDisplay.textContent = age >= 0 ? `Age: ${age} years` : '';
                    }
                }

                if (birthdateField) {
                    birthdateField.addEventListener('change', calculateAge);
                    calculateAge(); // Calculate on load if value is set
                }
            });
            </script>
            </div>
<div class="help-text">When is this task due?</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].projects[0].tasks[0].assigned_to">Assigned To</label>
<input name="departments[0].projects[0].tasks[0].assigned_to" id="departments[0].projects[0].tasks[0].assigned_to" placeholder="Team member name" type="text" />
<div class="help-text">Who is responsible for this task?</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].projects[0].tasks[0].estimated_hours">Estimated Hours</label>
<input name="departments[0].projects[0].tasks[0].estimated_hours" id="departments[0].projects[0].tasks[0].estimated_hours" min="0.5" max="1000" step="0.1" placeholder="50.0%" inputmode="numeric" type="number" />
<div class="help-text">Estimated time to complete (in hours)</div></div>
                </div>
                <div class="col-12">
                    
<div class="model-list-block" data-field-name="departments[0].projects[0].tasks[0].subtasks" data-min-items="0" data-max-items="50">
    <div class="model-list-items" id="departments[0].projects[0].tasks[0].subtasks-items"><template class="model-list-item-template">
        <div class="model-list-item card border mb-3"
             data-index="0"
             data-title-template="πŸ”Ή {title}"
             data-field-name="departments[0].projects[0].tasks[0].subtasks">
            <div class="card-header d-flex justify-content-between align-items-center">
                <h6 class="mb-0">
                    <button class="btn btn-link text-decoration-none p-0 text-start"
                            type="button"
                            data-bs-toggle="collapse"
                            data-bs-target="#departments_0__projects_0__tasks_0__subtasks_item_0_content"
                            aria-expanded="false"
                            aria-controls="departments_0__projects_0__tasks_0__subtasks_item_0_content">
                        <i class="bi bi-chevron-right me-2"></i>
                        <i class="bi bi-card-list me-2"></i>
                        Item #1
                    </button>
                </h6>
                <button type="button"
                        class="btn btn-outline-danger btn-sm remove-item-btn"
                        data-index="0"
                        data-field-name="departments[0].projects[0].tasks[0].subtasks"
                        title="Remove this item">
                    <i class="bi bi-trash"></i>
                </button>
            </div>
            <div class="collapse collapse show" id="departments_0__projects_0__tasks_0__subtasks_item_0_content">
                <div class="card-body"><div class="row">
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].projects[0].tasks[0].subtasks[0].title">Subtask Title</label>
<input name="departments[0].projects[0].tasks[0].subtasks[0].title" id="departments[0].projects[0].tasks[0].subtasks[0].title" maxlength="200" placeholder="Brief description of the subtask" type="text" />
<div class="help-text">What is this subtask about?</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].projects[0].tasks[0].subtasks[0].description">Description</label>
<textarea name="departments[0].projects[0].tasks[0].subtasks[0].description" id="departments[0].projects[0].tasks[0].subtasks[0].description" placeholder="Detailed description of the subtask"></textarea>
<div class="help-text">Additional details about this subtask</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].projects[0].tasks[0].subtasks[0].assigned_to">Assigned To</label>
<input name="departments[0].projects[0].tasks[0].subtasks[0].assigned_to" id="departments[0].projects[0].tasks[0].subtasks[0].assigned_to" maxlength="100" placeholder="Team member name" type="text" />
<div class="help-text">Who is responsible for this subtask?</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].projects[0].tasks[0].subtasks[0].estimated_hours">Estimated Hours</label>
<input name="departments[0].projects[0].tasks[0].subtasks[0].estimated_hours" id="departments[0].projects[0].tasks[0].subtasks[0].estimated_hours" min="0.5" max="100" step="0.1" placeholder="50.0%" inputmode="numeric" type="number" />
<div class="help-text">Estimated time to complete</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><div class="field">
<label for="departments[0].projects[0].tasks[0].subtasks[0].status">Status</label>
<select name="departments[0].projects[0].tasks[0].subtasks[0].status" id="departments[0].projects[0].tasks[0].subtasks[0].status"><option value="pending">⏳ Pending</option>
<option value="in_progress">πŸ”„ In Progress</option>
<option value="completed">βœ… Completed</option>
<option value="blocked">🚫 Blocked</option></select>
<div class="help-text">Current status of the subtask</div>
</div></div>
                </div></div>
                </div>
            </div>
        </div></template>
        <div class="model-list-item card border mb-3"
             data-index="0"
             data-title-template="πŸ”Ή {title}"
             data-field-name="departments[0].projects[0].tasks[0].subtasks">
            <div class="card-header d-flex justify-content-between align-items-center">
                <h6 class="mb-0">
                    <button class="btn btn-link text-decoration-none p-0 text-start"
                            type="button"
                            data-bs-toggle="collapse"
                            data-bs-target="#departments_0__projects_0__tasks_0__subtasks_item_0_content"
                            aria-expanded="false"
                            aria-controls="departments_0__projects_0__tasks_0__subtasks_item_0_content">
                        <i class="bi bi-chevron-right me-2"></i>
                        <i class="bi bi-card-list me-2"></i>
                        Item #1
                    </button>
                </h6>
                <button type="button"
                        class="btn btn-outline-danger btn-sm remove-item-btn"
                        data-index="0"
                        data-field-name="departments[0].projects[0].tasks[0].subtasks"
                        title="Remove this item">
                    <i class="bi bi-trash"></i>
                </button>
            </div>
            <div class="collapse collapse show" id="departments_0__projects_0__tasks_0__subtasks_item_0_content">
                <div class="card-body"><div class="row">
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].projects[0].tasks[0].subtasks[0].title">Subtask Title</label>
<input name="departments[0].projects[0].tasks[0].subtasks[0].title" id="departments[0].projects[0].tasks[0].subtasks[0].title" maxlength="200" placeholder="Brief description of the subtask" type="text" />
<div class="help-text">What is this subtask about?</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].projects[0].tasks[0].subtasks[0].description">Description</label>
<textarea name="departments[0].projects[0].tasks[0].subtasks[0].description" id="departments[0].projects[0].tasks[0].subtasks[0].description" placeholder="Detailed description of the subtask"></textarea>
<div class="help-text">Additional details about this subtask</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].projects[0].tasks[0].subtasks[0].assigned_to">Assigned To</label>
<input name="departments[0].projects[0].tasks[0].subtasks[0].assigned_to" id="departments[0].projects[0].tasks[0].subtasks[0].assigned_to" maxlength="100" placeholder="Team member name" type="text" />
<div class="help-text">Who is responsible for this subtask?</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].projects[0].tasks[0].subtasks[0].estimated_hours">Estimated Hours</label>
<input name="departments[0].projects[0].tasks[0].subtasks[0].estimated_hours" id="departments[0].projects[0].tasks[0].subtasks[0].estimated_hours" min="0.5" max="100" step="0.1" placeholder="50.0%" inputmode="numeric" type="number" />
<div class="help-text">Estimated time to complete</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><div class="field">
<label for="departments[0].projects[0].tasks[0].subtasks[0].status">Status</label>
<select name="departments[0].projects[0].tasks[0].subtasks[0].status" id="departments[0].projects[0].tasks[0].subtasks[0].status"><option value="pending">⏳ Pending</option>
<option value="in_progress">πŸ”„ In Progress</option>
<option value="completed">βœ… Completed</option>
<option value="blocked">🚫 Blocked</option></select>
<div class="help-text">Current status of the subtask</div>
</div></div>
                </div></div>
                </div>
            </div>
        </div></div>
    <button type="button" class="add-item-btn" data-target="departments[0].projects[0].tasks[0].subtasks">Add Item</button>
    
<div class="model-list-help">Break down this task into smaller subtasks</div>

    
</div>

                </div></div>
                </div>
            </div>
        </div></template>
        <div class="model-list-item card border mb-3"
             data-index="0"
             data-title-template="πŸ“‹ {title}"
             data-field-name="departments[0].projects[0].tasks">
            <div class="card-header d-flex justify-content-between align-items-center">
                <h6 class="mb-0">
                    <button class="btn btn-link text-decoration-none p-0 text-start"
                            type="button"
                            data-bs-toggle="collapse"
                            data-bs-target="#departments_0__projects_0__tasks_item_0_content"
                            aria-expanded="false"
                            aria-controls="departments_0__projects_0__tasks_item_0_content">
                        <i class="bi bi-chevron-right me-2"></i>
                        <i class="bi bi-card-list me-2"></i>
                        Item #1
                    </button>
                </h6>
                <button type="button"
                        class="btn btn-outline-danger btn-sm remove-item-btn"
                        data-index="0"
                        data-field-name="departments[0].projects[0].tasks"
                        title="Remove this item">
                    <i class="bi bi-trash"></i>
                </button>
            </div>
            <div class="collapse collapse show" id="departments_0__projects_0__tasks_item_0_content">
                <div class="card-body"><div class="row">
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].projects[0].tasks[0].title">Task Title</label>
<input name="departments[0].projects[0].tasks[0].title" id="departments[0].projects[0].tasks[0].title" minlength="3" maxlength="200" placeholder="Brief task name" type="text" />
<div class="help-text">What is this task?</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].projects[0].tasks[0].description">Task Description</label>
<textarea name="departments[0].projects[0].tasks[0].description" id="departments[0].projects[0].tasks[0].description" maxlength="2000" placeholder="Detailed description of the task"></textarea>
<div class="help-text">Full description of what needs to be done</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><div class="field">
<label for="departments[0].projects[0].tasks[0].priority">Priority Level</label>
<div class="input-with-icon"><span class="input-icon">exclamation-circle</span>
<select name="departments[0].projects[0].tasks[0].priority" id="departments[0].projects[0].tasks[0].priority"><option value="low">🟒 Low</option>
<option value="medium">🟑 Medium</option>
<option value="high">πŸ”΄ High</option>
<option value="critical">β›” Critical</option></select>
</div>
<div class="help-text">Task priority level</div>
</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><div class="field">
<label for="departments[0].projects[0].tasks[0].status">Task Status</label>
<select name="departments[0].projects[0].tasks[0].status" id="departments[0].projects[0].tasks[0].status"><option value="planning">πŸ“‹ Planning</option>
<option value="in_progress">πŸ”„ In Progress</option>
<option value="in_review">πŸ‘€ In Review</option>
<option value="completed">βœ… Completed</option>
<option value="cancelled">❌ Cancelled</option></select>
<div class="help-text">Current task status</div>
</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].projects[0].tasks[0].start_date">Start Date</label>
<div class="birthdate-input-group"><input name="departments[0].projects[0].tasks[0].start_date" id="departments[0].projects[0].tasks[0].start_date" max="2026-03-07" min="1876-01-01" type="date" />
            <div class="age-display" id="departments[0].projects[0].tasks[0].start_date_age" style="margin-top: 5px; font-size: 0.9em; color: #666;"></div>
            <script>
            document.addEventListener('DOMContentLoaded', function() {
                const birthdateField = document.getElementById('departments[0].projects[0].tasks[0].start_date');
                const ageDisplay = document.getElementById('departments[0].projects[0].tasks[0].start_date_age');

                function calculateAge() {
                    if (birthdateField.value && ageDisplay) {
                        const birthDate = new Date(birthdateField.value);
                        const today = new Date();
                        let age = today.getFullYear() - birthDate.getFullYear();
                        const monthDiff = today.getMonth() - birthDate.getMonth();

                        if (monthDiff < 0 || (monthDiff === 0 && today.getDate() < birthDate.getDate())) {
                            age--;
                        }

                        ageDisplay.textContent = age >= 0 ? `Age: ${age} years` : '';
                    }
                }

                if (birthdateField) {
                    birthdateField.addEventListener('change', calculateAge);
                    calculateAge(); // Calculate on load if value is set
                }
            });
            </script>
            </div>
<div class="help-text">When should this task start?</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].projects[0].tasks[0].due_date">Due Date</label>
<div class="birthdate-input-group"><input name="departments[0].projects[0].tasks[0].due_date" id="departments[0].projects[0].tasks[0].due_date" max="2026-03-07" min="1876-01-01" type="date" />
            <div class="age-display" id="departments[0].projects[0].tasks[0].due_date_age" style="margin-top: 5px; font-size: 0.9em; color: #666;"></div>
            <script>
            document.addEventListener('DOMContentLoaded', function() {
                const birthdateField = document.getElementById('departments[0].projects[0].tasks[0].due_date');
                const ageDisplay = document.getElementById('departments[0].projects[0].tasks[0].due_date_age');

                function calculateAge() {
                    if (birthdateField.value && ageDisplay) {
                        const birthDate = new Date(birthdateField.value);
                        const today = new Date();
                        let age = today.getFullYear() - birthDate.getFullYear();
                        const monthDiff = today.getMonth() - birthDate.getMonth();

                        if (monthDiff < 0 || (monthDiff === 0 && today.getDate() < birthDate.getDate())) {
                            age--;
                        }

                        ageDisplay.textContent = age >= 0 ? `Age: ${age} years` : '';
                    }
                }

                if (birthdateField) {
                    birthdateField.addEventListener('change', calculateAge);
                    calculateAge(); // Calculate on load if value is set
                }
            });
            </script>
            </div>
<div class="help-text">When is this task due?</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].projects[0].tasks[0].assigned_to">Assigned To</label>
<input name="departments[0].projects[0].tasks[0].assigned_to" id="departments[0].projects[0].tasks[0].assigned_to" placeholder="Team member name" type="text" />
<div class="help-text">Who is responsible for this task?</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].projects[0].tasks[0].estimated_hours">Estimated Hours</label>
<input name="departments[0].projects[0].tasks[0].estimated_hours" id="departments[0].projects[0].tasks[0].estimated_hours" min="0.5" max="1000" step="0.1" placeholder="50.0%" inputmode="numeric" type="number" />
<div class="help-text">Estimated time to complete (in hours)</div></div>
                </div>
                <div class="col-12">
                    
<div class="model-list-block" data-field-name="departments[0].projects[0].tasks[0].subtasks" data-min-items="0" data-max-items="50">
    <div class="model-list-items" id="departments[0].projects[0].tasks[0].subtasks-items"><template class="model-list-item-template">
        <div class="model-list-item card border mb-3"
             data-index="0"
             data-title-template="πŸ”Ή {title}"
             data-field-name="departments[0].projects[0].tasks[0].subtasks">
            <div class="card-header d-flex justify-content-between align-items-center">
                <h6 class="mb-0">
                    <button class="btn btn-link text-decoration-none p-0 text-start"
                            type="button"
                            data-bs-toggle="collapse"
                            data-bs-target="#departments_0__projects_0__tasks_0__subtasks_item_0_content"
                            aria-expanded="false"
                            aria-controls="departments_0__projects_0__tasks_0__subtasks_item_0_content">
                        <i class="bi bi-chevron-right me-2"></i>
                        <i class="bi bi-card-list me-2"></i>
                        Item #1
                    </button>
                </h6>
                <button type="button"
                        class="btn btn-outline-danger btn-sm remove-item-btn"
                        data-index="0"
                        data-field-name="departments[0].projects[0].tasks[0].subtasks"
                        title="Remove this item">
                    <i class="bi bi-trash"></i>
                </button>
            </div>
            <div class="collapse collapse show" id="departments_0__projects_0__tasks_0__subtasks_item_0_content">
                <div class="card-body"><div class="row">
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].projects[0].tasks[0].subtasks[0].title">Subtask Title</label>
<input name="departments[0].projects[0].tasks[0].subtasks[0].title" id="departments[0].projects[0].tasks[0].subtasks[0].title" maxlength="200" placeholder="Brief description of the subtask" type="text" />
<div class="help-text">What is this subtask about?</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].projects[0].tasks[0].subtasks[0].description">Description</label>
<textarea name="departments[0].projects[0].tasks[0].subtasks[0].description" id="departments[0].projects[0].tasks[0].subtasks[0].description" placeholder="Detailed description of the subtask"></textarea>
<div class="help-text">Additional details about this subtask</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].projects[0].tasks[0].subtasks[0].assigned_to">Assigned To</label>
<input name="departments[0].projects[0].tasks[0].subtasks[0].assigned_to" id="departments[0].projects[0].tasks[0].subtasks[0].assigned_to" maxlength="100" placeholder="Team member name" type="text" />
<div class="help-text">Who is responsible for this subtask?</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].projects[0].tasks[0].subtasks[0].estimated_hours">Estimated Hours</label>
<input name="departments[0].projects[0].tasks[0].subtasks[0].estimated_hours" id="departments[0].projects[0].tasks[0].subtasks[0].estimated_hours" min="0.5" max="100" step="0.1" placeholder="50.0%" inputmode="numeric" type="number" />
<div class="help-text">Estimated time to complete</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><div class="field">
<label for="departments[0].projects[0].tasks[0].subtasks[0].status">Status</label>
<select name="departments[0].projects[0].tasks[0].subtasks[0].status" id="departments[0].projects[0].tasks[0].subtasks[0].status"><option value="pending">⏳ Pending</option>
<option value="in_progress">πŸ”„ In Progress</option>
<option value="completed">βœ… Completed</option>
<option value="blocked">🚫 Blocked</option></select>
<div class="help-text">Current status of the subtask</div>
</div></div>
                </div></div>
                </div>
            </div>
        </div></template>
        <div class="model-list-item card border mb-3"
             data-index="0"
             data-title-template="πŸ”Ή {title}"
             data-field-name="departments[0].projects[0].tasks[0].subtasks">
            <div class="card-header d-flex justify-content-between align-items-center">
                <h6 class="mb-0">
                    <button class="btn btn-link text-decoration-none p-0 text-start"
                            type="button"
                            data-bs-toggle="collapse"
                            data-bs-target="#departments_0__projects_0__tasks_0__subtasks_item_0_content"
                            aria-expanded="false"
                            aria-controls="departments_0__projects_0__tasks_0__subtasks_item_0_content">
                        <i class="bi bi-chevron-right me-2"></i>
                        <i class="bi bi-card-list me-2"></i>
                        Item #1
                    </button>
                </h6>
                <button type="button"
                        class="btn btn-outline-danger btn-sm remove-item-btn"
                        data-index="0"
                        data-field-name="departments[0].projects[0].tasks[0].subtasks"
                        title="Remove this item">
                    <i class="bi bi-trash"></i>
                </button>
            </div>
            <div class="collapse collapse show" id="departments_0__projects_0__tasks_0__subtasks_item_0_content">
                <div class="card-body"><div class="row">
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].projects[0].tasks[0].subtasks[0].title">Subtask Title</label>
<input name="departments[0].projects[0].tasks[0].subtasks[0].title" id="departments[0].projects[0].tasks[0].subtasks[0].title" maxlength="200" placeholder="Brief description of the subtask" type="text" />
<div class="help-text">What is this subtask about?</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].projects[0].tasks[0].subtasks[0].description">Description</label>
<textarea name="departments[0].projects[0].tasks[0].subtasks[0].description" id="departments[0].projects[0].tasks[0].subtasks[0].description" placeholder="Detailed description of the subtask"></textarea>
<div class="help-text">Additional details about this subtask</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].projects[0].tasks[0].subtasks[0].assigned_to">Assigned To</label>
<input name="departments[0].projects[0].tasks[0].subtasks[0].assigned_to" id="departments[0].projects[0].tasks[0].subtasks[0].assigned_to" maxlength="100" placeholder="Team member name" type="text" />
<div class="help-text">Who is responsible for this subtask?</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].projects[0].tasks[0].subtasks[0].estimated_hours">Estimated Hours</label>
<input name="departments[0].projects[0].tasks[0].subtasks[0].estimated_hours" id="departments[0].projects[0].tasks[0].subtasks[0].estimated_hours" min="0.5" max="100" step="0.1" placeholder="50.0%" inputmode="numeric" type="number" />
<div class="help-text">Estimated time to complete</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><div class="field">
<label for="departments[0].projects[0].tasks[0].subtasks[0].status">Status</label>
<select name="departments[0].projects[0].tasks[0].subtasks[0].status" id="departments[0].projects[0].tasks[0].subtasks[0].status"><option value="pending">⏳ Pending</option>
<option value="in_progress">πŸ”„ In Progress</option>
<option value="completed">βœ… Completed</option>
<option value="blocked">🚫 Blocked</option></select>
<div class="help-text">Current status of the subtask</div>
</div></div>
                </div></div>
                </div>
            </div>
        </div></div>
    <button type="button" class="add-item-btn" data-target="departments[0].projects[0].tasks[0].subtasks">Add Item</button>
    
<div class="model-list-help">Break down this task into smaller subtasks</div>

    
</div>

                </div></div>
                </div>
            </div>
        </div></div>
    <button type="button" class="add-item-btn" data-target="departments[0].projects[0].tasks">Add Item</button>
    
<div class="model-list-help">Add tasks with subtasks to organize project work</div>

    
</div>

                </div></div>
                </div>
            </div>
        </div></template>
        <div class="model-list-item card border mb-3"
             data-index="0"
             data-title-template="πŸš€ {name}"
             data-field-name="departments[0].projects">
            <div class="card-header d-flex justify-content-between align-items-center">
                <h6 class="mb-0">
                    <button class="btn btn-link text-decoration-none p-0 text-start"
                            type="button"
                            data-bs-toggle="collapse"
                            data-bs-target="#departments_0__projects_item_0_content"
                            aria-expanded="false"
                            aria-controls="departments_0__projects_item_0_content">
                        <i class="bi bi-chevron-right me-2"></i>
                        <i class="bi bi-card-list me-2"></i>
                        πŸš€ Microservices Migration
                    </button>
                </h6>
                <button type="button"
                        class="btn btn-outline-danger btn-sm remove-item-btn"
                        data-index="0"
                        data-field-name="departments[0].projects"
                        title="Remove this item">
                    <i class="bi bi-trash"></i>
                </button>
            </div>
            <div class="collapse collapse show" id="departments_0__projects_item_0_content">
                <div class="card-body"><div class="row">
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].projects[0].name">Project Name</label>
<input name="departments[0].projects[0].name" id="departments[0].projects[0].name" value="Microservices Migration" minlength="3" maxlength="200" placeholder="e.g., Mobile App Redesign" type="text" />
<div class="help-text">Name of the project</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].projects[0].description">Project Description</label>
<textarea name="departments[0].projects[0].description" id="departments[0].projects[0].description" maxlength="2000" placeholder="Detailed description of the project">Migrate monolithic application to microservices architecture</textarea>
<div class="help-text">What is this project about?</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><div class="field">
<label for="departments[0].projects[0].status">Project Status</label>
<div class="input-with-icon"><span class="input-icon">flag</span>
<select name="departments[0].projects[0].status" id="departments[0].projects[0].status"><option value="planning">πŸ“‹ Planning</option>
<option value="in_progress" selected>πŸš€ In Progress</option>
<option value="on_hold">⏸️ On Hold</option>
<option value="completed">βœ… Completed</option>
<option value="archived">πŸ“¦ Archived</option></select>
</div>
<div class="help-text">Current project status</div>
</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].projects[0].start_date">Project Start Date</label>
<div class="birthdate-input-group"><input name="departments[0].projects[0].start_date" id="departments[0].projects[0].start_date" value="2024-01-01" max="2026-03-07" min="1876-01-01" type="date" />
            <div class="age-display" id="departments[0].projects[0].start_date_age" style="margin-top: 5px; font-size: 0.9em; color: #666;"></div>
            <script>
            document.addEventListener('DOMContentLoaded', function() {
                const birthdateField = document.getElementById('departments[0].projects[0].start_date');
                const ageDisplay = document.getElementById('departments[0].projects[0].start_date_age');

                function calculateAge() {
                    if (birthdateField.value && ageDisplay) {
                        const birthDate = new Date(birthdateField.value);
                        const today = new Date();
                        let age = today.getFullYear() - birthDate.getFullYear();
                        const monthDiff = today.getMonth() - birthDate.getMonth();

                        if (monthDiff < 0 || (monthDiff === 0 && today.getDate() < birthDate.getDate())) {
                            age--;
                        }

                        ageDisplay.textContent = age >= 0 ? `Age: ${age} years` : '';
                    }
                }

                if (birthdateField) {
                    birthdateField.addEventListener('change', calculateAge);
                    calculateAge(); // Calculate on load if value is set
                }
            });
            </script>
            </div>
<div class="help-text">When does this project start?</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].projects[0].target_end_date">Target End Date</label>
<div class="birthdate-input-group"><input name="departments[0].projects[0].target_end_date" id="departments[0].projects[0].target_end_date" value="2024-12-31" max="2026-03-07" min="1876-01-01" type="date" />
            <div class="age-display" id="departments[0].projects[0].target_end_date_age" style="margin-top: 5px; font-size: 0.9em; color: #666;"></div>
            <script>
            document.addEventListener('DOMContentLoaded', function() {
                const birthdateField = document.getElementById('departments[0].projects[0].target_end_date');
                const ageDisplay = document.getElementById('departments[0].projects[0].target_end_date_age');

                function calculateAge() {
                    if (birthdateField.value && ageDisplay) {
                        const birthDate = new Date(birthdateField.value);
                        const today = new Date();
                        let age = today.getFullYear() - birthDate.getFullYear();
                        const monthDiff = today.getMonth() - birthDate.getMonth();

                        if (monthDiff < 0 || (monthDiff === 0 && today.getDate() < birthDate.getDate())) {
                            age--;
                        }

                        ageDisplay.textContent = age >= 0 ? `Age: ${age} years` : '';
                    }
                }

                if (birthdateField) {
                    birthdateField.addEventListener('change', calculateAge);
                    calculateAge(); // Calculate on load if value is set
                }
            });
            </script>
            </div>
<div class="help-text">When should this project be completed?</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].projects[0].budget">Budget ($)</label>
<input name="departments[0].projects[0].budget" id="departments[0].projects[0].budget" value="2000000.0" min="0" max="100" step="0.1" placeholder="50.0%" inputmode="numeric" type="number" />
<div class="help-text">Project budget in USD</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].projects[0].project_manager">Project Manager</label>
<input name="departments[0].projects[0].project_manager" id="departments[0].projects[0].project_manager" value="Carol Lee" maxlength="100" placeholder="PM name" type="text" />
<div class="help-text">Who is managing this project?</div></div>
                </div>
                <div class="col-12">
                    
<div class="model-list-block" data-field-name="departments[0].projects[0].tasks" data-min-items="1" data-max-items="200">
    <div class="model-list-items" id="departments[0].projects[0].tasks-items"><template class="model-list-item-template">
        <div class="model-list-item card border mb-3"
             data-index="0"
             data-title-template="πŸ“‹ {title}"
             data-field-name="departments[0].projects[0].tasks">
            <div class="card-header d-flex justify-content-between align-items-center">
                <h6 class="mb-0">
                    <button class="btn btn-link text-decoration-none p-0 text-start"
                            type="button"
                            data-bs-toggle="collapse"
                            data-bs-target="#departments_0__projects_0__tasks_item_0_content"
                            aria-expanded="false"
                            aria-controls="departments_0__projects_0__tasks_item_0_content">
                        <i class="bi bi-chevron-right me-2"></i>
                        <i class="bi bi-card-list me-2"></i>
                        Item #1
                    </button>
                </h6>
                <button type="button"
                        class="btn btn-outline-danger btn-sm remove-item-btn"
                        data-index="0"
                        data-field-name="departments[0].projects[0].tasks"
                        title="Remove this item">
                    <i class="bi bi-trash"></i>
                </button>
            </div>
            <div class="collapse collapse show" id="departments_0__projects_0__tasks_item_0_content">
                <div class="card-body"><div class="row">
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].projects[0].tasks[0].title">Task Title</label>
<input name="departments[0].projects[0].tasks[0].title" id="departments[0].projects[0].tasks[0].title" minlength="3" maxlength="200" placeholder="Brief task name" type="text" />
<div class="help-text">What is this task?</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].projects[0].tasks[0].description">Task Description</label>
<textarea name="departments[0].projects[0].tasks[0].description" id="departments[0].projects[0].tasks[0].description" maxlength="2000" placeholder="Detailed description of the task"></textarea>
<div class="help-text">Full description of what needs to be done</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><div class="field">
<label for="departments[0].projects[0].tasks[0].priority">Priority Level</label>
<div class="input-with-icon"><span class="input-icon">exclamation-circle</span>
<select name="departments[0].projects[0].tasks[0].priority" id="departments[0].projects[0].tasks[0].priority"><option value="low">🟒 Low</option>
<option value="medium">🟑 Medium</option>
<option value="high">πŸ”΄ High</option>
<option value="critical">β›” Critical</option></select>
</div>
<div class="help-text">Task priority level</div>
</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><div class="field">
<label for="departments[0].projects[0].tasks[0].status">Task Status</label>
<select name="departments[0].projects[0].tasks[0].status" id="departments[0].projects[0].tasks[0].status"><option value="planning">πŸ“‹ Planning</option>
<option value="in_progress">πŸ”„ In Progress</option>
<option value="in_review">πŸ‘€ In Review</option>
<option value="completed">βœ… Completed</option>
<option value="cancelled">❌ Cancelled</option></select>
<div class="help-text">Current task status</div>
</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].projects[0].tasks[0].start_date">Start Date</label>
<div class="birthdate-input-group"><input name="departments[0].projects[0].tasks[0].start_date" id="departments[0].projects[0].tasks[0].start_date" max="2026-03-07" min="1876-01-01" type="date" />
            <div class="age-display" id="departments[0].projects[0].tasks[0].start_date_age" style="margin-top: 5px; font-size: 0.9em; color: #666;"></div>
            <script>
            document.addEventListener('DOMContentLoaded', function() {
                const birthdateField = document.getElementById('departments[0].projects[0].tasks[0].start_date');
                const ageDisplay = document.getElementById('departments[0].projects[0].tasks[0].start_date_age');

                function calculateAge() {
                    if (birthdateField.value && ageDisplay) {
                        const birthDate = new Date(birthdateField.value);
                        const today = new Date();
                        let age = today.getFullYear() - birthDate.getFullYear();
                        const monthDiff = today.getMonth() - birthDate.getMonth();

                        if (monthDiff < 0 || (monthDiff === 0 && today.getDate() < birthDate.getDate())) {
                            age--;
                        }

                        ageDisplay.textContent = age >= 0 ? `Age: ${age} years` : '';
                    }
                }

                if (birthdateField) {
                    birthdateField.addEventListener('change', calculateAge);
                    calculateAge(); // Calculate on load if value is set
                }
            });
            </script>
            </div>
<div class="help-text">When should this task start?</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].projects[0].tasks[0].due_date">Due Date</label>
<div class="birthdate-input-group"><input name="departments[0].projects[0].tasks[0].due_date" id="departments[0].projects[0].tasks[0].due_date" max="2026-03-07" min="1876-01-01" type="date" />
            <div class="age-display" id="departments[0].projects[0].tasks[0].due_date_age" style="margin-top: 5px; font-size: 0.9em; color: #666;"></div>
            <script>
            document.addEventListener('DOMContentLoaded', function() {
                const birthdateField = document.getElementById('departments[0].projects[0].tasks[0].due_date');
                const ageDisplay = document.getElementById('departments[0].projects[0].tasks[0].due_date_age');

                function calculateAge() {
                    if (birthdateField.value && ageDisplay) {
                        const birthDate = new Date(birthdateField.value);
                        const today = new Date();
                        let age = today.getFullYear() - birthDate.getFullYear();
                        const monthDiff = today.getMonth() - birthDate.getMonth();

                        if (monthDiff < 0 || (monthDiff === 0 && today.getDate() < birthDate.getDate())) {
                            age--;
                        }

                        ageDisplay.textContent = age >= 0 ? `Age: ${age} years` : '';
                    }
                }

                if (birthdateField) {
                    birthdateField.addEventListener('change', calculateAge);
                    calculateAge(); // Calculate on load if value is set
                }
            });
            </script>
            </div>
<div class="help-text">When is this task due?</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].projects[0].tasks[0].assigned_to">Assigned To</label>
<input name="departments[0].projects[0].tasks[0].assigned_to" id="departments[0].projects[0].tasks[0].assigned_to" placeholder="Team member name" type="text" />
<div class="help-text">Who is responsible for this task?</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].projects[0].tasks[0].estimated_hours">Estimated Hours</label>
<input name="departments[0].projects[0].tasks[0].estimated_hours" id="departments[0].projects[0].tasks[0].estimated_hours" min="0.5" max="1000" step="0.1" placeholder="50.0%" inputmode="numeric" type="number" />
<div class="help-text">Estimated time to complete (in hours)</div></div>
                </div>
                <div class="col-12">
                    
<div class="model-list-block" data-field-name="departments[0].projects[0].tasks[0].subtasks" data-min-items="0" data-max-items="50">
    <div class="model-list-items" id="departments[0].projects[0].tasks[0].subtasks-items"><template class="model-list-item-template">
        <div class="model-list-item card border mb-3"
             data-index="0"
             data-title-template="πŸ”Ή {title}"
             data-field-name="departments[0].projects[0].tasks[0].subtasks">
            <div class="card-header d-flex justify-content-between align-items-center">
                <h6 class="mb-0">
                    <button class="btn btn-link text-decoration-none p-0 text-start"
                            type="button"
                            data-bs-toggle="collapse"
                            data-bs-target="#departments_0__projects_0__tasks_0__subtasks_item_0_content"
                            aria-expanded="false"
                            aria-controls="departments_0__projects_0__tasks_0__subtasks_item_0_content">
                        <i class="bi bi-chevron-right me-2"></i>
                        <i class="bi bi-card-list me-2"></i>
                        Item #1
                    </button>
                </h6>
                <button type="button"
                        class="btn btn-outline-danger btn-sm remove-item-btn"
                        data-index="0"
                        data-field-name="departments[0].projects[0].tasks[0].subtasks"
                        title="Remove this item">
                    <i class="bi bi-trash"></i>
                </button>
            </div>
            <div class="collapse collapse show" id="departments_0__projects_0__tasks_0__subtasks_item_0_content">
                <div class="card-body"><div class="row">
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].projects[0].tasks[0].subtasks[0].title">Subtask Title</label>
<input name="departments[0].projects[0].tasks[0].subtasks[0].title" id="departments[0].projects[0].tasks[0].subtasks[0].title" maxlength="200" placeholder="Brief description of the subtask" type="text" />
<div class="help-text">What is this subtask about?</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].projects[0].tasks[0].subtasks[0].description">Description</label>
<textarea name="departments[0].projects[0].tasks[0].subtasks[0].description" id="departments[0].projects[0].tasks[0].subtasks[0].description" placeholder="Detailed description of the subtask"></textarea>
<div class="help-text">Additional details about this subtask</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].projects[0].tasks[0].subtasks[0].assigned_to">Assigned To</label>
<input name="departments[0].projects[0].tasks[0].subtasks[0].assigned_to" id="departments[0].projects[0].tasks[0].subtasks[0].assigned_to" maxlength="100" placeholder="Team member name" type="text" />
<div class="help-text">Who is responsible for this subtask?</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].projects[0].tasks[0].subtasks[0].estimated_hours">Estimated Hours</label>
<input name="departments[0].projects[0].tasks[0].subtasks[0].estimated_hours" id="departments[0].projects[0].tasks[0].subtasks[0].estimated_hours" min="0.5" max="100" step="0.1" placeholder="50.0%" inputmode="numeric" type="number" />
<div class="help-text">Estimated time to complete</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><div class="field">
<label for="departments[0].projects[0].tasks[0].subtasks[0].status">Status</label>
<select name="departments[0].projects[0].tasks[0].subtasks[0].status" id="departments[0].projects[0].tasks[0].subtasks[0].status"><option value="pending">⏳ Pending</option>
<option value="in_progress">πŸ”„ In Progress</option>
<option value="completed">βœ… Completed</option>
<option value="blocked">🚫 Blocked</option></select>
<div class="help-text">Current status of the subtask</div>
</div></div>
                </div></div>
                </div>
            </div>
        </div></template>
        <div class="model-list-item card border mb-3"
             data-index="0"
             data-title-template="πŸ”Ή {title}"
             data-field-name="departments[0].projects[0].tasks[0].subtasks">
            <div class="card-header d-flex justify-content-between align-items-center">
                <h6 class="mb-0">
                    <button class="btn btn-link text-decoration-none p-0 text-start"
                            type="button"
                            data-bs-toggle="collapse"
                            data-bs-target="#departments_0__projects_0__tasks_0__subtasks_item_0_content"
                            aria-expanded="false"
                            aria-controls="departments_0__projects_0__tasks_0__subtasks_item_0_content">
                        <i class="bi bi-chevron-right me-2"></i>
                        <i class="bi bi-card-list me-2"></i>
                        Item #1
                    </button>
                </h6>
                <button type="button"
                        class="btn btn-outline-danger btn-sm remove-item-btn"
                        data-index="0"
                        data-field-name="departments[0].projects[0].tasks[0].subtasks"
                        title="Remove this item">
                    <i class="bi bi-trash"></i>
                </button>
            </div>
            <div class="collapse collapse show" id="departments_0__projects_0__tasks_0__subtasks_item_0_content">
                <div class="card-body"><div class="row">
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].projects[0].tasks[0].subtasks[0].title">Subtask Title</label>
<input name="departments[0].projects[0].tasks[0].subtasks[0].title" id="departments[0].projects[0].tasks[0].subtasks[0].title" maxlength="200" placeholder="Brief description of the subtask" type="text" />
<div class="help-text">What is this subtask about?</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].projects[0].tasks[0].subtasks[0].description">Description</label>
<textarea name="departments[0].projects[0].tasks[0].subtasks[0].description" id="departments[0].projects[0].tasks[0].subtasks[0].description" placeholder="Detailed description of the subtask"></textarea>
<div class="help-text">Additional details about this subtask</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].projects[0].tasks[0].subtasks[0].assigned_to">Assigned To</label>
<input name="departments[0].projects[0].tasks[0].subtasks[0].assigned_to" id="departments[0].projects[0].tasks[0].subtasks[0].assigned_to" maxlength="100" placeholder="Team member name" type="text" />
<div class="help-text">Who is responsible for this subtask?</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].projects[0].tasks[0].subtasks[0].estimated_hours">Estimated Hours</label>
<input name="departments[0].projects[0].tasks[0].subtasks[0].estimated_hours" id="departments[0].projects[0].tasks[0].subtasks[0].estimated_hours" min="0.5" max="100" step="0.1" placeholder="50.0%" inputmode="numeric" type="number" />
<div class="help-text">Estimated time to complete</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><div class="field">
<label for="departments[0].projects[0].tasks[0].subtasks[0].status">Status</label>
<select name="departments[0].projects[0].tasks[0].subtasks[0].status" id="departments[0].projects[0].tasks[0].subtasks[0].status"><option value="pending">⏳ Pending</option>
<option value="in_progress">πŸ”„ In Progress</option>
<option value="completed">βœ… Completed</option>
<option value="blocked">🚫 Blocked</option></select>
<div class="help-text">Current status of the subtask</div>
</div></div>
                </div></div>
                </div>
            </div>
        </div></div>
    <button type="button" class="add-item-btn" data-target="departments[0].projects[0].tasks[0].subtasks">Add Item</button>
    
<div class="model-list-help">Break down this task into smaller subtasks</div>

    
</div>

                </div></div>
                </div>
            </div>
        </div></template>
        <div class="model-list-item card border mb-3"
             data-index="0"
             data-title-template="πŸ“‹ {title}"
             data-field-name="departments[0].projects[0].tasks">
            <div class="card-header d-flex justify-content-between align-items-center">
                <h6 class="mb-0">
                    <button class="btn btn-link text-decoration-none p-0 text-start"
                            type="button"
                            data-bs-toggle="collapse"
                            data-bs-target="#departments_0__projects_0__tasks_item_0_content"
                            aria-expanded="false"
                            aria-controls="departments_0__projects_0__tasks_item_0_content">
                        <i class="bi bi-chevron-right me-2"></i>
                        <i class="bi bi-card-list me-2"></i>
                        πŸ“‹ Refactor Auth Service
                    </button>
                </h6>
                <button type="button"
                        class="btn btn-outline-danger btn-sm remove-item-btn"
                        data-index="0"
                        data-field-name="departments[0].projects[0].tasks"
                        title="Remove this item">
                    <i class="bi bi-trash"></i>
                </button>
            </div>
            <div class="collapse collapse show" id="departments_0__projects_0__tasks_item_0_content">
                <div class="card-body"><div class="row">
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].projects[0].tasks[0].title">Task Title</label>
<input name="departments[0].projects[0].tasks[0].title" id="departments[0].projects[0].tasks[0].title" value="Refactor Auth Service" minlength="3" maxlength="200" placeholder="Brief task name" type="text" />
<div class="help-text">What is this task?</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].projects[0].tasks[0].description">Task Description</label>
<textarea name="departments[0].projects[0].tasks[0].description" id="departments[0].projects[0].tasks[0].description" maxlength="2000" placeholder="Detailed description of the task">Extract authentication into standalone microservice</textarea>
<div class="help-text">Full description of what needs to be done</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><div class="field">
<label for="departments[0].projects[0].tasks[0].priority">Priority Level</label>
<div class="input-with-icon"><span class="input-icon">exclamation-circle</span>
<select name="departments[0].projects[0].tasks[0].priority" id="departments[0].projects[0].tasks[0].priority"><option value="low">🟒 Low</option>
<option value="medium">🟑 Medium</option>
<option value="high" selected>πŸ”΄ High</option>
<option value="critical">β›” Critical</option></select>
</div>
<div class="help-text">Task priority level</div>
</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><div class="field">
<label for="departments[0].projects[0].tasks[0].status">Task Status</label>
<select name="departments[0].projects[0].tasks[0].status" id="departments[0].projects[0].tasks[0].status"><option value="planning">πŸ“‹ Planning</option>
<option value="in_progress" selected>πŸ”„ In Progress</option>
<option value="in_review">πŸ‘€ In Review</option>
<option value="completed">βœ… Completed</option>
<option value="cancelled">❌ Cancelled</option></select>
<div class="help-text">Current task status</div>
</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].projects[0].tasks[0].start_date">Start Date</label>
<div class="birthdate-input-group"><input name="departments[0].projects[0].tasks[0].start_date" id="departments[0].projects[0].tasks[0].start_date" value="2024-02-01" max="2026-03-07" min="1876-01-01" type="date" />
            <div class="age-display" id="departments[0].projects[0].tasks[0].start_date_age" style="margin-top: 5px; font-size: 0.9em; color: #666;"></div>
            <script>
            document.addEventListener('DOMContentLoaded', function() {
                const birthdateField = document.getElementById('departments[0].projects[0].tasks[0].start_date');
                const ageDisplay = document.getElementById('departments[0].projects[0].tasks[0].start_date_age');

                function calculateAge() {
                    if (birthdateField.value && ageDisplay) {
                        const birthDate = new Date(birthdateField.value);
                        const today = new Date();
                        let age = today.getFullYear() - birthDate.getFullYear();
                        const monthDiff = today.getMonth() - birthDate.getMonth();

                        if (monthDiff < 0 || (monthDiff === 0 && today.getDate() < birthDate.getDate())) {
                            age--;
                        }

                        ageDisplay.textContent = age >= 0 ? `Age: ${age} years` : '';
                    }
                }

                if (birthdateField) {
                    birthdateField.addEventListener('change', calculateAge);
                    calculateAge(); // Calculate on load if value is set
                }
            });
            </script>
            </div>
<div class="help-text">When should this task start?</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].projects[0].tasks[0].due_date">Due Date</label>
<div class="birthdate-input-group"><input name="departments[0].projects[0].tasks[0].due_date" id="departments[0].projects[0].tasks[0].due_date" value="2024-03-31" max="2026-03-07" min="1876-01-01" type="date" />
            <div class="age-display" id="departments[0].projects[0].tasks[0].due_date_age" style="margin-top: 5px; font-size: 0.9em; color: #666;"></div>
            <script>
            document.addEventListener('DOMContentLoaded', function() {
                const birthdateField = document.getElementById('departments[0].projects[0].tasks[0].due_date');
                const ageDisplay = document.getElementById('departments[0].projects[0].tasks[0].due_date_age');

                function calculateAge() {
                    if (birthdateField.value && ageDisplay) {
                        const birthDate = new Date(birthdateField.value);
                        const today = new Date();
                        let age = today.getFullYear() - birthDate.getFullYear();
                        const monthDiff = today.getMonth() - birthDate.getMonth();

                        if (monthDiff < 0 || (monthDiff === 0 && today.getDate() < birthDate.getDate())) {
                            age--;
                        }

                        ageDisplay.textContent = age >= 0 ? `Age: ${age} years` : '';
                    }
                }

                if (birthdateField) {
                    birthdateField.addEventListener('change', calculateAge);
                    calculateAge(); // Calculate on load if value is set
                }
            });
            </script>
            </div>
<div class="help-text">When is this task due?</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].projects[0].tasks[0].assigned_to">Assigned To</label>
<input name="departments[0].projects[0].tasks[0].assigned_to" id="departments[0].projects[0].tasks[0].assigned_to" value="Bob Wilson" placeholder="Team member name" type="text" />
<div class="help-text">Who is responsible for this task?</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].projects[0].tasks[0].estimated_hours">Estimated Hours</label>
<input name="departments[0].projects[0].tasks[0].estimated_hours" id="departments[0].projects[0].tasks[0].estimated_hours" value="120.0" min="0.5" max="1000" step="0.1" placeholder="50.0%" inputmode="numeric" type="number" />
<div class="help-text">Estimated time to complete (in hours)</div></div>
                </div>
                <div class="col-12">
                    
<div class="model-list-block" data-field-name="departments[0].projects[0].tasks[0].subtasks" data-min-items="0" data-max-items="50">
    <div class="model-list-items" id="departments[0].projects[0].tasks[0].subtasks-items"><template class="model-list-item-template">
        <div class="model-list-item card border mb-3"
             data-index="0"
             data-title-template="πŸ”Ή {title}"
             data-field-name="departments[0].projects[0].tasks[0].subtasks">
            <div class="card-header d-flex justify-content-between align-items-center">
                <h6 class="mb-0">
                    <button class="btn btn-link text-decoration-none p-0 text-start"
                            type="button"
                            data-bs-toggle="collapse"
                            data-bs-target="#departments_0__projects_0__tasks_0__subtasks_item_0_content"
                            aria-expanded="false"
                            aria-controls="departments_0__projects_0__tasks_0__subtasks_item_0_content">
                        <i class="bi bi-chevron-right me-2"></i>
                        <i class="bi bi-card-list me-2"></i>
                        Item #1
                    </button>
                </h6>
                <button type="button"
                        class="btn btn-outline-danger btn-sm remove-item-btn"
                        data-index="0"
                        data-field-name="departments[0].projects[0].tasks[0].subtasks"
                        title="Remove this item">
                    <i class="bi bi-trash"></i>
                </button>
            </div>
            <div class="collapse collapse show" id="departments_0__projects_0__tasks_0__subtasks_item_0_content">
                <div class="card-body"><div class="row">
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].projects[0].tasks[0].subtasks[0].title">Subtask Title</label>
<input name="departments[0].projects[0].tasks[0].subtasks[0].title" id="departments[0].projects[0].tasks[0].subtasks[0].title" maxlength="200" placeholder="Brief description of the subtask" type="text" />
<div class="help-text">What is this subtask about?</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].projects[0].tasks[0].subtasks[0].description">Description</label>
<textarea name="departments[0].projects[0].tasks[0].subtasks[0].description" id="departments[0].projects[0].tasks[0].subtasks[0].description" placeholder="Detailed description of the subtask"></textarea>
<div class="help-text">Additional details about this subtask</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].projects[0].tasks[0].subtasks[0].assigned_to">Assigned To</label>
<input name="departments[0].projects[0].tasks[0].subtasks[0].assigned_to" id="departments[0].projects[0].tasks[0].subtasks[0].assigned_to" maxlength="100" placeholder="Team member name" type="text" />
<div class="help-text">Who is responsible for this subtask?</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].projects[0].tasks[0].subtasks[0].estimated_hours">Estimated Hours</label>
<input name="departments[0].projects[0].tasks[0].subtasks[0].estimated_hours" id="departments[0].projects[0].tasks[0].subtasks[0].estimated_hours" min="0.5" max="100" step="0.1" placeholder="50.0%" inputmode="numeric" type="number" />
<div class="help-text">Estimated time to complete</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><div class="field">
<label for="departments[0].projects[0].tasks[0].subtasks[0].status">Status</label>
<select name="departments[0].projects[0].tasks[0].subtasks[0].status" id="departments[0].projects[0].tasks[0].subtasks[0].status"><option value="pending">⏳ Pending</option>
<option value="in_progress">πŸ”„ In Progress</option>
<option value="completed">βœ… Completed</option>
<option value="blocked">🚫 Blocked</option></select>
<div class="help-text">Current status of the subtask</div>
</div></div>
                </div></div>
                </div>
            </div>
        </div></template>
        <div class="model-list-item card border mb-3"
             data-index="0"
             data-title-template="πŸ”Ή {title}"
             data-field-name="departments[0].projects[0].tasks[0].subtasks">
            <div class="card-header d-flex justify-content-between align-items-center">
                <h6 class="mb-0">
                    <button class="btn btn-link text-decoration-none p-0 text-start"
                            type="button"
                            data-bs-toggle="collapse"
                            data-bs-target="#departments_0__projects_0__tasks_0__subtasks_item_0_content"
                            aria-expanded="false"
                            aria-controls="departments_0__projects_0__tasks_0__subtasks_item_0_content">
                        <i class="bi bi-chevron-right me-2"></i>
                        <i class="bi bi-card-list me-2"></i>
                        πŸ”Ή Create service skeleton
                    </button>
                </h6>
                <button type="button"
                        class="btn btn-outline-danger btn-sm remove-item-btn"
                        data-index="0"
                        data-field-name="departments[0].projects[0].tasks[0].subtasks"
                        title="Remove this item">
                    <i class="bi bi-trash"></i>
                </button>
            </div>
            <div class="collapse collapse show" id="departments_0__projects_0__tasks_0__subtasks_item_0_content">
                <div class="card-body"><div class="row">
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].projects[0].tasks[0].subtasks[0].title">Subtask Title</label>
<input name="departments[0].projects[0].tasks[0].subtasks[0].title" id="departments[0].projects[0].tasks[0].subtasks[0].title" value="Create service skeleton" maxlength="200" placeholder="Brief description of the subtask" type="text" />
<div class="help-text">What is this subtask about?</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].projects[0].tasks[0].subtasks[0].description">Description</label>
<textarea name="departments[0].projects[0].tasks[0].subtasks[0].description" id="departments[0].projects[0].tasks[0].subtasks[0].description" placeholder="Detailed description of the subtask">Set up FastAPI project structure</textarea>
<div class="help-text">Additional details about this subtask</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].projects[0].tasks[0].subtasks[0].assigned_to">Assigned To</label>
<input name="departments[0].projects[0].tasks[0].subtasks[0].assigned_to" id="departments[0].projects[0].tasks[0].subtasks[0].assigned_to" value="Bob Wilson" maxlength="100" placeholder="Team member name" type="text" />
<div class="help-text">Who is responsible for this subtask?</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="departments[0].projects[0].tasks[0].subtasks[0].estimated_hours">Estimated Hours</label>
<input name="departments[0].projects[0].tasks[0].subtasks[0].estimated_hours" id="departments[0].projects[0].tasks[0].subtasks[0].estimated_hours" value="16.0" min="0.5" max="100" step="0.1" placeholder="50.0%" inputmode="numeric" type="number" />
<div class="help-text">Estimated time to complete</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><div class="field">
<label for="departments[0].projects[0].tasks[0].subtasks[0].status">Status</label>
<select name="departments[0].projects[0].tasks[0].subtasks[0].status" id="departments[0].projects[0].tasks[0].subtasks[0].status"><option value="pending">⏳ Pending</option>
<option value="in_progress">πŸ”„ In Progress</option>
<option value="completed" selected>βœ… Completed</option>
<option value="blocked">🚫 Blocked</option></select>
<div class="help-text">Current status of the subtask</div>
</div></div>
                </div></div>
                </div>
            </div>
        </div></div>
    <button type="button" class="add-item-btn" data-target="departments[0].projects[0].tasks[0].subtasks">Add Item</button>
    
<div class="model-list-help">Break down this task into smaller subtasks</div>

    
</div>

                </div></div>
                </div>
            </div>
        </div></div>
    <button type="button" class="add-item-btn" data-target="departments[0].projects[0].tasks">Add Item</button>
    
<div class="model-list-help">Add tasks with subtasks to organize project work</div>

    
</div>

                </div></div>
                </div>
            </div>
        </div></div>
    <button type="button" class="add-item-btn" data-target="departments[0].projects">Add Item</button>
    
<div class="model-list-help">Projects managed by this department</div>

    
</div>

                </div></div>
                </div>
            </div>
        </div></div>
    <button type="button" class="add-item-btn" data-target="departments">Add Item</button>
    
<div class="model-list-help">Organize departments with teams, members, and projects</div>

    
</div>
</div>
</div>


<div id="tab-4"
     class="tab-panel"
     role="tabpanel"
     style="display: none;"
     aria-hidden="true">
    <div class="vertical-layout vertical-layout" style="display: flex; flex-direction: column; gap: 1rem; align-items: stretch"><div class="field"><label for="calendar_name">Calendar Name *</label>
<input name="calendar_name" id="calendar_name" value="Work Calendar" required="required" maxlength="100" placeholder="Work Calendar" type="text" />
<div class="help-text">Name for this calendar</div></div>
<div class="field"><div class="field">
<label for="timezone">Timezone</label>
<div class="input-with-icon"><span class="input-icon">globe</span>
<select name="timezone" id="timezone"><option value="America/New_York">πŸŒ† Eastern (ET)</option>
<option value="America/Chicago">πŸŒ‡ Central (CT)</option>
<option value="America/Denver">πŸ”οΈ Mountain (MT)</option>
<option value="America/Los_Angeles" selected>🌴 Pacific (PT)</option>
<option value="Europe/London">πŸ‡¬πŸ‡§ London (GMT)</option>
<option value="Europe/Paris">πŸ‡«πŸ‡· Paris (CET)</option>
<option value="Asia/Tokyo">πŸ‡―πŸ‡΅ Tokyo (JST)</option></select>
</div>
<div class="help-text">Your timezone</div>
</div></div>
<div class="field"><label for="default_event_duration">Default Event Duration (minutes)</label>
<input name="default_event_duration" id="default_event_duration" value="60" min="1" max="5" step="1" type="range" />
        <div class="star-rating" id="default_event_duration-stars">
            β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…
        </div>
        <script>
        document.addEventListener('DOMContentLoaded', function() {
            const range = document.getElementById('default_event_duration');
            const stars = document.getElementById('default_event_duration-stars');
            if (range && stars) {
                range.addEventListener('input', function() {
                    const value = parseInt(this.value);
                    const maxRating = 5;
                    stars.textContent = 'β˜…'.repeat(value) + 'β˜†'.repeat(maxRating - value);
                });
            }
        });
        </script>
        
<div class="help-text">Default length for new events</div></div>
<div class="field"><label for="work_start_time">Work Start Time</label>
<input name="work_start_time" id="work_start_time" value="09:00" step="60" type="time" />
<div class="help-text">When does your workday start?</div></div>
<div class="field"><label for="work_end_time">Work End Time</label>
<input name="work_end_time" id="work_end_time" value="17:00" step="60" type="time" />
<div class="help-text">When does your workday end?</div></div>
<div class="field"><div class="field">
<label for="weekend_days">Weekend Days</label>
<div class="input-with-icon"><span class="input-icon">calendar-x</span>
<select name="weekend_days" id="weekend_days"><option value="sunday" selected>Sunday</option>
<option value="monday">Monday</option>
<option value="tuesday">Tuesday</option>
<option value="wednesday">Wednesday</option>
<option value="thursday">Thursday</option>
<option value="friday">Friday</option>
<option value="saturday" selected>Saturday</option></select>
</div>
<div class="help-text">Select your non-working days</div>
</div></div>

<div class="model-list-block" data-field-name="recurring_events" data-min-items="0" data-max-items="50">
    <div class="model-list-items" id="recurring_events-items"><template class="model-list-item-template">
        <div class="model-list-item card border mb-3"
             data-index="0"
             data-title-template="πŸ”„ {event_name} ({recurrence_pattern})"
             data-field-name="recurring_events">
            <div class="card-header d-flex justify-content-between align-items-center">
                <h6 class="mb-0">
                    <button class="btn btn-link text-decoration-none p-0 text-start"
                            type="button"
                            data-bs-toggle="collapse"
                            data-bs-target="#recurring_events_item_0_content"
                            aria-expanded="false"
                            aria-controls="recurring_events_item_0_content">
                        <i class="bi bi-chevron-right me-2"></i>
                        <i class="bi bi-card-list me-2"></i>
                        Item #1
                    </button>
                </h6>
                <button type="button"
                        class="btn btn-outline-danger btn-sm remove-item-btn"
                        data-index="0"
                        data-field-name="recurring_events"
                        title="Remove this item">
                    <i class="bi bi-trash"></i>
                </button>
            </div>
            <div class="collapse collapse show" id="recurring_events_item_0_content">
                <div class="card-body"><div class="row">
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="recurring_events[0].event_name">Event Name</label>
<input name="recurring_events[0].event_name" id="recurring_events[0].event_name" maxlength="200" placeholder="Weekly Team Meeting" type="text" />
<div class="help-text">Name of the recurring event</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><div class="field">
<label for="recurring_events[0].event_type">Event Type</label>
<select name="recurring_events[0].event_type" id="recurring_events[0].event_type"><option value="meeting">🀝 Meeting</option>
<option value="reminder">⏰ Reminder</option>
<option value="deadline">πŸ“… Deadline</option>
<option value="birthday">πŸŽ‚ Birthday</option>
<option value="anniversary">πŸ’ Anniversary</option>
<option value="other">πŸ“Œ Other</option></select>
<div class="help-text">Type of event</div>
</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="recurring_events[0].start_date">Start Date</label>
<div class="birthdate-input-group"><input name="recurring_events[0].start_date" id="recurring_events[0].start_date" max="2026-03-07" min="1876-01-01" type="date" />
            <div class="age-display" id="recurring_events[0].start_date_age" style="margin-top: 5px; font-size: 0.9em; color: #666;"></div>
            <script>
            document.addEventListener('DOMContentLoaded', function() {
                const birthdateField = document.getElementById('recurring_events[0].start_date');
                const ageDisplay = document.getElementById('recurring_events[0].start_date_age');

                function calculateAge() {
                    if (birthdateField.value && ageDisplay) {
                        const birthDate = new Date(birthdateField.value);
                        const today = new Date();
                        let age = today.getFullYear() - birthDate.getFullYear();
                        const monthDiff = today.getMonth() - birthDate.getMonth();

                        if (monthDiff < 0 || (monthDiff === 0 && today.getDate() < birthDate.getDate())) {
                            age--;
                        }

                        ageDisplay.textContent = age >= 0 ? `Age: ${age} years` : '';
                    }
                }

                if (birthdateField) {
                    birthdateField.addEventListener('change', calculateAge);
                    calculateAge(); // Calculate on load if value is set
                }
            });
            </script>
            </div>
<div class="help-text">When does this event start?</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="recurring_events[0].start_time">Start Time</label>
<input name="recurring_events[0].start_time" id="recurring_events[0].start_time" step="60" type="time" />
<div class="help-text">Event start time (optional)</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="recurring_events[0].duration_minutes">Duration (minutes)</label>
<input name="recurring_events[0].duration_minutes" id="recurring_events[0].duration_minutes" min="15" max="1440" step="0.1" placeholder="50.0%" inputmode="numeric" type="number" />
<div class="help-text">How long is the event?</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><div class="field">
<label for="recurring_events[0].recurrence_pattern">Recurrence Pattern</label>
<select name="recurring_events[0].recurrence_pattern" id="recurring_events[0].recurrence_pattern"><option value="daily">πŸ“† Daily</option>
<option value="weekly">πŸ“… Weekly</option>
<option value="biweekly">πŸ“…πŸ“… Bi-weekly</option>
<option value="monthly">πŸ“† Monthly</option>
<option value="yearly">πŸ—“οΈ Yearly</option></select>
<div class="help-text">How often does this repeat?</div>
</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="recurring_events[0].end_date">End Date</label>
<div class="birthdate-input-group"><input name="recurring_events[0].end_date" id="recurring_events[0].end_date" max="2026-03-07" min="1876-01-01" type="date" />
            <div class="age-display" id="recurring_events[0].end_date_age" style="margin-top: 5px; font-size: 0.9em; color: #666;"></div>
            <script>
            document.addEventListener('DOMContentLoaded', function() {
                const birthdateField = document.getElementById('recurring_events[0].end_date');
                const ageDisplay = document.getElementById('recurring_events[0].end_date_age');

                function calculateAge() {
                    if (birthdateField.value && ageDisplay) {
                        const birthDate = new Date(birthdateField.value);
                        const today = new Date();
                        let age = today.getFullYear() - birthDate.getFullYear();
                        const monthDiff = today.getMonth() - birthDate.getMonth();

                        if (monthDiff < 0 || (monthDiff === 0 && today.getDate() < birthDate.getDate())) {
                            age--;
                        }

                        ageDisplay.textContent = age >= 0 ? `Age: ${age} years` : '';
                    }
                }

                if (birthdateField) {
                    birthdateField.addEventListener('change', calculateAge);
                    calculateAge(); // Calculate on load if value is set
                }
            });
            </script>
            </div>
<div class="help-text">When should recurrence stop? (optional)</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="recurring_events[0].location">Location</label>
<input name="recurring_events[0].location" id="recurring_events[0].location" placeholder="Conference Room A" type="text" />
<div class="help-text">Where will this event take place?</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="recurring_events[0].send_reminder">Send Reminder</label>
<input name="recurring_events[0].send_reminder" id="recurring_events[0].send_reminder" value="1" type="checkbox" />
<div class="help-text">Send notification before event?</div></div>
                </div></div>
                </div>
            </div>
        </div></template>
        <div class="model-list-item card border mb-3"
             data-index="0"
             data-title-template="πŸ”„ {event_name} ({recurrence_pattern})"
             data-field-name="recurring_events">
            <div class="card-header d-flex justify-content-between align-items-center">
                <h6 class="mb-0">
                    <button class="btn btn-link text-decoration-none p-0 text-start"
                            type="button"
                            data-bs-toggle="collapse"
                            data-bs-target="#recurring_events_item_0_content"
                            aria-expanded="false"
                            aria-controls="recurring_events_item_0_content">
                        <i class="bi bi-chevron-right me-2"></i>
                        <i class="bi bi-card-list me-2"></i>
                        πŸ”„ Weekly Team Standup (weekly)
                    </button>
                </h6>
                <button type="button"
                        class="btn btn-outline-danger btn-sm remove-item-btn"
                        data-index="0"
                        data-field-name="recurring_events"
                        title="Remove this item">
                    <i class="bi bi-trash"></i>
                </button>
            </div>
            <div class="collapse collapse show" id="recurring_events_item_0_content">
                <div class="card-body"><div class="row">
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="recurring_events[0].event_name">Event Name</label>
<input name="recurring_events[0].event_name" id="recurring_events[0].event_name" value="Weekly Team Standup" maxlength="200" placeholder="Weekly Team Meeting" type="text" />
<div class="help-text">Name of the recurring event</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><div class="field">
<label for="recurring_events[0].event_type">Event Type</label>
<select name="recurring_events[0].event_type" id="recurring_events[0].event_type"><option value="meeting" selected>🀝 Meeting</option>
<option value="reminder">⏰ Reminder</option>
<option value="deadline">πŸ“… Deadline</option>
<option value="birthday">πŸŽ‚ Birthday</option>
<option value="anniversary">πŸ’ Anniversary</option>
<option value="other">πŸ“Œ Other</option></select>
<div class="help-text">Type of event</div>
</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="recurring_events[0].start_date">Start Date</label>
<div class="birthdate-input-group"><input name="recurring_events[0].start_date" id="recurring_events[0].start_date" value="2024-01-08" max="2026-03-07" min="1876-01-01" type="date" />
            <div class="age-display" id="recurring_events[0].start_date_age" style="margin-top: 5px; font-size: 0.9em; color: #666;"></div>
            <script>
            document.addEventListener('DOMContentLoaded', function() {
                const birthdateField = document.getElementById('recurring_events[0].start_date');
                const ageDisplay = document.getElementById('recurring_events[0].start_date_age');

                function calculateAge() {
                    if (birthdateField.value && ageDisplay) {
                        const birthDate = new Date(birthdateField.value);
                        const today = new Date();
                        let age = today.getFullYear() - birthDate.getFullYear();
                        const monthDiff = today.getMonth() - birthDate.getMonth();

                        if (monthDiff < 0 || (monthDiff === 0 && today.getDate() < birthDate.getDate())) {
                            age--;
                        }

                        ageDisplay.textContent = age >= 0 ? `Age: ${age} years` : '';
                    }
                }

                if (birthdateField) {
                    birthdateField.addEventListener('change', calculateAge);
                    calculateAge(); // Calculate on load if value is set
                }
            });
            </script>
            </div>
<div class="help-text">When does this event start?</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="recurring_events[0].start_time">Start Time</label>
<input name="recurring_events[0].start_time" id="recurring_events[0].start_time" value="10:00" step="60" type="time" />
<div class="help-text">Event start time (optional)</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="recurring_events[0].duration_minutes">Duration (minutes)</label>
<input name="recurring_events[0].duration_minutes" id="recurring_events[0].duration_minutes" value="30" min="15" max="1440" step="0.1" placeholder="50.0%" inputmode="numeric" type="number" />
<div class="help-text">How long is the event?</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><div class="field">
<label for="recurring_events[0].recurrence_pattern">Recurrence Pattern</label>
<select name="recurring_events[0].recurrence_pattern" id="recurring_events[0].recurrence_pattern"><option value="daily">πŸ“† Daily</option>
<option value="weekly" selected>πŸ“… Weekly</option>
<option value="biweekly">πŸ“…πŸ“… Bi-weekly</option>
<option value="monthly">πŸ“† Monthly</option>
<option value="yearly">πŸ—“οΈ Yearly</option></select>
<div class="help-text">How often does this repeat?</div>
</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="recurring_events[0].end_date">End Date</label>
<div class="birthdate-input-group"><input name="recurring_events[0].end_date" id="recurring_events[0].end_date" value="2024-12-31" max="2026-03-07" min="1876-01-01" type="date" />
            <div class="age-display" id="recurring_events[0].end_date_age" style="margin-top: 5px; font-size: 0.9em; color: #666;"></div>
            <script>
            document.addEventListener('DOMContentLoaded', function() {
                const birthdateField = document.getElementById('recurring_events[0].end_date');
                const ageDisplay = document.getElementById('recurring_events[0].end_date_age');

                function calculateAge() {
                    if (birthdateField.value && ageDisplay) {
                        const birthDate = new Date(birthdateField.value);
                        const today = new Date();
                        let age = today.getFullYear() - birthDate.getFullYear();
                        const monthDiff = today.getMonth() - birthDate.getMonth();

                        if (monthDiff < 0 || (monthDiff === 0 && today.getDate() < birthDate.getDate())) {
                            age--;
                        }

                        ageDisplay.textContent = age >= 0 ? `Age: ${age} years` : '';
                    }
                }

                if (birthdateField) {
                    birthdateField.addEventListener('change', calculateAge);
                    calculateAge(); // Calculate on load if value is set
                }
            });
            </script>
            </div>
<div class="help-text">When should recurrence stop? (optional)</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="recurring_events[0].location">Location</label>
<input name="recurring_events[0].location" id="recurring_events[0].location" value="Conference Room A" placeholder="Conference Room A" type="text" />
<div class="help-text">Where will this event take place?</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="recurring_events[0].send_reminder">Send Reminder</label>
<input name="recurring_events[0].send_reminder" id="recurring_events[0].send_reminder" checked="checked" value="1" type="checkbox" />
<div class="help-text">Send notification before event?</div></div>
                </div></div>
                </div>
            </div>
        </div>
        <div class="model-list-item card border mb-3"
             data-index="1"
             data-title-template="πŸ”„ {event_name} ({recurrence_pattern})"
             data-field-name="recurring_events">
            <div class="card-header d-flex justify-content-between align-items-center">
                <h6 class="mb-0">
                    <button class="btn btn-link text-decoration-none p-0 text-start"
                            type="button"
                            data-bs-toggle="collapse"
                            data-bs-target="#recurring_events_item_1_content"
                            aria-expanded="false"
                            aria-controls="recurring_events_item_1_content">
                        <i class="bi bi-chevron-right me-2"></i>
                        <i class="bi bi-card-list me-2"></i>
                        πŸ”„ Monthly All Hands (monthly)
                    </button>
                </h6>
                <button type="button"
                        class="btn btn-outline-danger btn-sm remove-item-btn"
                        data-index="1"
                        data-field-name="recurring_events"
                        title="Remove this item">
                    <i class="bi bi-trash"></i>
                </button>
            </div>
            <div class="collapse collapse show" id="recurring_events_item_1_content">
                <div class="card-body"><div class="row">
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="recurring_events[1].event_name">Event Name</label>
<input name="recurring_events[1].event_name" id="recurring_events[1].event_name" value="Monthly All Hands" maxlength="200" placeholder="Weekly Team Meeting" type="text" />
<div class="help-text">Name of the recurring event</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><div class="field">
<label for="recurring_events[1].event_type">Event Type</label>
<select name="recurring_events[1].event_type" id="recurring_events[1].event_type"><option value="meeting" selected>🀝 Meeting</option>
<option value="reminder">⏰ Reminder</option>
<option value="deadline">πŸ“… Deadline</option>
<option value="birthday">πŸŽ‚ Birthday</option>
<option value="anniversary">πŸ’ Anniversary</option>
<option value="other">πŸ“Œ Other</option></select>
<div class="help-text">Type of event</div>
</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="recurring_events[1].start_date">Start Date</label>
<div class="birthdate-input-group"><input name="recurring_events[1].start_date" id="recurring_events[1].start_date" value="2024-01-15" max="2026-03-07" min="1876-01-01" type="date" />
            <div class="age-display" id="recurring_events[1].start_date_age" style="margin-top: 5px; font-size: 0.9em; color: #666;"></div>
            <script>
            document.addEventListener('DOMContentLoaded', function() {
                const birthdateField = document.getElementById('recurring_events[1].start_date');
                const ageDisplay = document.getElementById('recurring_events[1].start_date_age');

                function calculateAge() {
                    if (birthdateField.value && ageDisplay) {
                        const birthDate = new Date(birthdateField.value);
                        const today = new Date();
                        let age = today.getFullYear() - birthDate.getFullYear();
                        const monthDiff = today.getMonth() - birthDate.getMonth();

                        if (monthDiff < 0 || (monthDiff === 0 && today.getDate() < birthDate.getDate())) {
                            age--;
                        }

                        ageDisplay.textContent = age >= 0 ? `Age: ${age} years` : '';
                    }
                }

                if (birthdateField) {
                    birthdateField.addEventListener('change', calculateAge);
                    calculateAge(); // Calculate on load if value is set
                }
            });
            </script>
            </div>
<div class="help-text">When does this event start?</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="recurring_events[1].start_time">Start Time</label>
<input name="recurring_events[1].start_time" id="recurring_events[1].start_time" value="14:00" step="60" type="time" />
<div class="help-text">Event start time (optional)</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="recurring_events[1].duration_minutes">Duration (minutes)</label>
<input name="recurring_events[1].duration_minutes" id="recurring_events[1].duration_minutes" value="90" min="15" max="1440" step="0.1" placeholder="50.0%" inputmode="numeric" type="number" />
<div class="help-text">How long is the event?</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><div class="field">
<label for="recurring_events[1].recurrence_pattern">Recurrence Pattern</label>
<select name="recurring_events[1].recurrence_pattern" id="recurring_events[1].recurrence_pattern"><option value="daily">πŸ“† Daily</option>
<option value="weekly">πŸ“… Weekly</option>
<option value="biweekly">πŸ“…πŸ“… Bi-weekly</option>
<option value="monthly" selected>πŸ“† Monthly</option>
<option value="yearly">πŸ—“οΈ Yearly</option></select>
<div class="help-text">How often does this repeat?</div>
</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="recurring_events[1].end_date">End Date</label>
<div class="birthdate-input-group"><input name="recurring_events[1].end_date" id="recurring_events[1].end_date" max="2026-03-07" min="1876-01-01" type="date" />
            <div class="age-display" id="recurring_events[1].end_date_age" style="margin-top: 5px; font-size: 0.9em; color: #666;"></div>
            <script>
            document.addEventListener('DOMContentLoaded', function() {
                const birthdateField = document.getElementById('recurring_events[1].end_date');
                const ageDisplay = document.getElementById('recurring_events[1].end_date_age');

                function calculateAge() {
                    if (birthdateField.value && ageDisplay) {
                        const birthDate = new Date(birthdateField.value);
                        const today = new Date();
                        let age = today.getFullYear() - birthDate.getFullYear();
                        const monthDiff = today.getMonth() - birthDate.getMonth();

                        if (monthDiff < 0 || (monthDiff === 0 && today.getDate() < birthDate.getDate())) {
                            age--;
                        }

                        ageDisplay.textContent = age >= 0 ? `Age: ${age} years` : '';
                    }
                }

                if (birthdateField) {
                    birthdateField.addEventListener('change', calculateAge);
                    calculateAge(); // Calculate on load if value is set
                }
            });
            </script>
            </div>
<div class="help-text">When should recurrence stop? (optional)</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="recurring_events[1].location">Location</label>
<input name="recurring_events[1].location" id="recurring_events[1].location" value="Main Auditorium" placeholder="Conference Room A" type="text" />
<div class="help-text">Where will this event take place?</div></div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="field"><label for="recurring_events[1].send_reminder">Send Reminder</label>
<input name="recurring_events[1].send_reminder" id="recurring_events[1].send_reminder" checked="checked" value="1" type="checkbox" />
<div class="help-text">Send notification before event?</div></div>
                </div></div>
                </div>
            </div>
        </div></div>
    <button type="button" class="add-item-btn" data-target="recurring_events">Add Item</button>
    
<div class="model-list-help">Set up recurring events and reminders</div>

    
</div>
</div>
</div>


<div id="tab-5"
     class="tab-panel"
     role="tabpanel"
     style="display: none;"
     aria-hidden="true">
    <div class="vertical-layout vertical-layout" style="display: flex; flex-direction: column; gap: 1rem; align-items: stretch"><div class="field"><label for="username">Username *</label>
<input name="username" id="username" value="jsmith" required="required" minlength="3" maxlength="50" placeholder="johndoe" type="text" />
<div class="help-text">Your unique username</div></div>
<div class="field"><label for="display_name">Display Name *</label>
<input name="display_name" id="display_name" value="John Smith" required="required" maxlength="100" placeholder="John Doe" type="text" />
<div class="help-text">Name shown to other users</div></div>
<div class="field"><div class="field">
<label for="language">Language</label>
<div class="input-with-icon"><span class="input-icon">translate</span>
<select name="language" id="language"><option value="en" selected>πŸ‡ΊπŸ‡Έ English</option>
<option value="es">πŸ‡ͺπŸ‡Έ EspaΓ±ol</option>
<option value="fr">πŸ‡«πŸ‡· FranΓ§ais</option>
<option value="de">πŸ‡©πŸ‡ͺ Deutsch</option>
<option value="ja">πŸ‡―πŸ‡΅ ζ—₯本θͺž</option>
<option value="zh">πŸ‡¨πŸ‡³ δΈ­ζ–‡</option></select>
</div>
<div class="help-text">Preferred language</div>
</div></div>
<div class="field"><div class="field">
<label for="ui_theme">UI Theme</label>
<fieldset class="radio-group" >
    <legend>UI Theme</legend>
    
            <div class="radio-item">
                <label for="ui_theme_0">
                    <input name="ui_theme" id="ui_theme_0" type="radio" value="light" />
                    <span class="radio-label">β˜€οΈ Light</span>
                </label>
            </div>
            

            <div class="radio-item">
                <label for="ui_theme_1">
                    <input name="ui_theme" id="ui_theme_1" type="radio" value="dark" />
                    <span class="radio-label">πŸŒ™ Dark</span>
                </label>
            </div>
            

            <div class="radio-item">
                <label for="ui_theme_2">
                    <input name="ui_theme" id="ui_theme_2" type="radio" value="auto" />
                    <span class="radio-label">πŸ”„ Auto</span>
                </label>
            </div>
            
</fieldset>
<div class="help-text">Interface theme preference</div>
</div></div>
<div class="field"><label for="font_size">Font Size (px)</label>
<input name="font_size" id="font_size" value="16" min="1" max="5" step="1" type="range" />
        <div class="star-rating" id="font_size-stars">
            β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…
        </div>
        <script>
        document.addEventListener('DOMContentLoaded', function() {
            const range = document.getElementById('font_size');
            const stars = document.getElementById('font_size-stars');
            if (range && stars) {
                range.addEventListener('input', function() {
                    const value = parseInt(this.value);
                    const maxRating = 5;
                    stars.textContent = 'β˜…'.repeat(value) + 'β˜†'.repeat(maxRating - value);
                });
            }
        });
        </script>
        
<div class="help-text">Adjust text size</div></div>
<div class="field"><label for="accessibility_mode">Accessibility Mode</label>
<input name="accessibility_mode" id="accessibility_mode" value="1" type="checkbox" />
<div class="help-text">Enable high-contrast and screen reader support</div></div>
<div class="field"><label for="compact_view">Compact View</label>
<input name="compact_view" id="compact_view" value="1" type="checkbox" />
<div class="help-text">Use denser layout to show more content</div></div>
<div class="field"><label for="show_tutorials">Show Tutorial Tooltips</label>
<input name="show_tutorials" id="show_tutorials" checked="checked" value="1" type="checkbox" />
<div class="help-text">Display helpful tips for new features</div></div>
<div class="field"><label for="auto_save">Auto-Save</label>
<input name="auto_save" id="auto_save" checked="checked" value="1" type="checkbox" />
<div class="help-text">Automatically save changes</div></div>
<div class="field"><label for="auto_save_interval">Auto-Save Interval (minutes)</label>
<input name="auto_save_interval" id="auto_save_interval" value="5" min="1" max="60" step="0.1" placeholder="50.0%" inputmode="numeric" type="number" />
<div class="help-text">How often to auto-save</div></div>

<div class="model-list-block" data-field-name="notification_preferences" data-min-items="0" data-max-items="20">
    <div class="model-list-items" id="notification_preferences-items"><template class="model-list-item-template">
        <div class="model-list-item card border mb-3"
             data-index="0"
             data-title-template="πŸ”” {event_category} via {notification_type}"
             data-field-name="notification_preferences">
            <div class="card-header d-flex justify-content-between align-items-center">
                <h6 class="mb-0">
                    <button class="btn btn-link text-decoration-none p-0 text-start"
                            type="button"
                            data-bs-toggle="collapse"
                            data-bs-target="#notification_preferences_item_0_content"
                            aria-expanded="false"
                            aria-controls="notification_preferences_item_0_content">
                        <i class="bi bi-chevron-right me-2"></i>
                        <i class="bi bi-card-list me-2"></i>
                        Item #1
                    </button>
                </h6>
                <button type="button"
                        class="btn btn-outline-danger btn-sm remove-item-btn"
                        data-index="0"
                        data-field-name="notification_preferences"
                        title="Remove this item">
                    <i class="bi bi-trash"></i>
                </button>
            </div>
            <div class="collapse collapse show" id="notification_preferences_item_0_content">
                <div class="card-body"><div class="row">
                <div class="col-md-6">
                    <div class="field"><div class="field">
<label for="notification_preferences[0].notification_type">Notification Type</label>
<select name="notification_preferences[0].notification_type" id="notification_preferences[0].notification_type"><option value="email">πŸ“§ Email</option>
<option value="sms">πŸ“± SMS</option>
<option value="push">πŸ”” Push Notification</option>
<option value="in_app">πŸ’¬ In-App</option></select>
<div class="help-text">Type of notification</div>
</div></div>
                </div>
                <div class="col-md-6">
                    <div class="field"><div class="field">
<label for="notification_preferences[0].event_category">Event Category</label>
<select name="notification_preferences[0].event_category" id="notification_preferences[0].event_category"><option value="security">πŸ”’ Security Alerts</option>
<option value="updates">πŸ“° Product Updates</option>
<option value="marketing">πŸ“£ Marketing</option>
<option value="reminders">⏰ Reminders</option>
<option value="social">πŸ‘₯ Social Activity</option></select>
<div class="help-text">What triggers this notification?</div>
</div></div>
                </div>
                <div class="col-md-6">
                    <div class="field"><label for="notification_preferences[0].enabled">Enabled</label>
<input name="notification_preferences[0].enabled" id="notification_preferences[0].enabled" value="1" type="checkbox" />
<div class="help-text">Receive these notifications?</div></div>
                </div>
                <div class="col-md-6">
                    <div class="field"><div class="field">
<label for="notification_preferences[0].frequency">Frequency</label>
<select name="notification_preferences[0].frequency" id="notification_preferences[0].frequency"><option value="realtime">⚑ Real-time</option>
<option value="hourly">πŸ• Hourly Digest</option>
<option value="daily">πŸ“… Daily Digest</option>
<option value="weekly">πŸ“† Weekly Digest</option></select>
<div class="help-text">How often to receive notifications?</div>
</div></div>
                </div></div>
                </div>
            </div>
        </div></template>
        <div class="model-list-item card border mb-3"
             data-index="0"
             data-title-template="πŸ”” {event_category} via {notification_type}"
             data-field-name="notification_preferences">
            <div class="card-header d-flex justify-content-between align-items-center">
                <h6 class="mb-0">
                    <button class="btn btn-link text-decoration-none p-0 text-start"
                            type="button"
                            data-bs-toggle="collapse"
                            data-bs-target="#notification_preferences_item_0_content"
                            aria-expanded="false"
                            aria-controls="notification_preferences_item_0_content">
                        <i class="bi bi-chevron-right me-2"></i>
                        <i class="bi bi-card-list me-2"></i>
                        πŸ”” security via email
                    </button>
                </h6>
                <button type="button"
                        class="btn btn-outline-danger btn-sm remove-item-btn"
                        data-index="0"
                        data-field-name="notification_preferences"
                        title="Remove this item">
                    <i class="bi bi-trash"></i>
                </button>
            </div>
            <div class="collapse collapse show" id="notification_preferences_item_0_content">
                <div class="card-body"><div class="row">
                <div class="col-md-6">
                    <div class="field"><div class="field">
<label for="notification_preferences[0].notification_type">Notification Type</label>
<select name="notification_preferences[0].notification_type" id="notification_preferences[0].notification_type"><option value="email" selected>πŸ“§ Email</option>
<option value="sms">πŸ“± SMS</option>
<option value="push">πŸ”” Push Notification</option>
<option value="in_app">πŸ’¬ In-App</option></select>
<div class="help-text">Type of notification</div>
</div></div>
                </div>
                <div class="col-md-6">
                    <div class="field"><div class="field">
<label for="notification_preferences[0].event_category">Event Category</label>
<select name="notification_preferences[0].event_category" id="notification_preferences[0].event_category"><option value="security" selected>πŸ”’ Security Alerts</option>
<option value="updates">πŸ“° Product Updates</option>
<option value="marketing">πŸ“£ Marketing</option>
<option value="reminders">⏰ Reminders</option>
<option value="social">πŸ‘₯ Social Activity</option></select>
<div class="help-text">What triggers this notification?</div>
</div></div>
                </div>
                <div class="col-md-6">
                    <div class="field"><label for="notification_preferences[0].enabled">Enabled</label>
<input name="notification_preferences[0].enabled" id="notification_preferences[0].enabled" checked="checked" value="1" type="checkbox" />
<div class="help-text">Receive these notifications?</div></div>
                </div>
                <div class="col-md-6">
                    <div class="field"><div class="field">
<label for="notification_preferences[0].frequency">Frequency</label>
<select name="notification_preferences[0].frequency" id="notification_preferences[0].frequency"><option value="realtime" selected>⚑ Real-time</option>
<option value="hourly">πŸ• Hourly Digest</option>
<option value="daily">πŸ“… Daily Digest</option>
<option value="weekly">πŸ“† Weekly Digest</option></select>
<div class="help-text">How often to receive notifications?</div>
</div></div>
                </div></div>
                </div>
            </div>
        </div>
        <div class="model-list-item card border mb-3"
             data-index="1"
             data-title-template="πŸ”” {event_category} via {notification_type}"
             data-field-name="notification_preferences">
            <div class="card-header d-flex justify-content-between align-items-center">
                <h6 class="mb-0">
                    <button class="btn btn-link text-decoration-none p-0 text-start"
                            type="button"
                            data-bs-toggle="collapse"
                            data-bs-target="#notification_preferences_item_1_content"
                            aria-expanded="false"
                            aria-controls="notification_preferences_item_1_content">
                        <i class="bi bi-chevron-right me-2"></i>
                        <i class="bi bi-card-list me-2"></i>
                        πŸ”” updates via push
                    </button>
                </h6>
                <button type="button"
                        class="btn btn-outline-danger btn-sm remove-item-btn"
                        data-index="1"
                        data-field-name="notification_preferences"
                        title="Remove this item">
                    <i class="bi bi-trash"></i>
                </button>
            </div>
            <div class="collapse collapse show" id="notification_preferences_item_1_content">
                <div class="card-body"><div class="row">
                <div class="col-md-6">
                    <div class="field"><div class="field">
<label for="notification_preferences[1].notification_type">Notification Type</label>
<select name="notification_preferences[1].notification_type" id="notification_preferences[1].notification_type"><option value="email">πŸ“§ Email</option>
<option value="sms">πŸ“± SMS</option>
<option value="push" selected>πŸ”” Push Notification</option>
<option value="in_app">πŸ’¬ In-App</option></select>
<div class="help-text">Type of notification</div>
</div></div>
                </div>
                <div class="col-md-6">
                    <div class="field"><div class="field">
<label for="notification_preferences[1].event_category">Event Category</label>
<select name="notification_preferences[1].event_category" id="notification_preferences[1].event_category"><option value="security">πŸ”’ Security Alerts</option>
<option value="updates" selected>πŸ“° Product Updates</option>
<option value="marketing">πŸ“£ Marketing</option>
<option value="reminders">⏰ Reminders</option>
<option value="social">πŸ‘₯ Social Activity</option></select>
<div class="help-text">What triggers this notification?</div>
</div></div>
                </div>
                <div class="col-md-6">
                    <div class="field"><label for="notification_preferences[1].enabled">Enabled</label>
<input name="notification_preferences[1].enabled" id="notification_preferences[1].enabled" checked="checked" value="1" type="checkbox" />
<div class="help-text">Receive these notifications?</div></div>
                </div>
                <div class="col-md-6">
                    <div class="field"><div class="field">
<label for="notification_preferences[1].frequency">Frequency</label>
<select name="notification_preferences[1].frequency" id="notification_preferences[1].frequency"><option value="realtime">⚑ Real-time</option>
<option value="hourly">πŸ• Hourly Digest</option>
<option value="daily" selected>πŸ“… Daily Digest</option>
<option value="weekly">πŸ“† Weekly Digest</option></select>
<div class="help-text">How often to receive notifications?</div>
</div></div>
                </div></div>
                </div>
            </div>
        </div>
        <div class="model-list-item card border mb-3"
             data-index="2"
             data-title-template="πŸ”” {event_category} via {notification_type}"
             data-field-name="notification_preferences">
            <div class="card-header d-flex justify-content-between align-items-center">
                <h6 class="mb-0">
                    <button class="btn btn-link text-decoration-none p-0 text-start"
                            type="button"
                            data-bs-toggle="collapse"
                            data-bs-target="#notification_preferences_item_2_content"
                            aria-expanded="false"
                            aria-controls="notification_preferences_item_2_content">
                        <i class="bi bi-chevron-right me-2"></i>
                        <i class="bi bi-card-list me-2"></i>
                        πŸ”” marketing via email
                    </button>
                </h6>
                <button type="button"
                        class="btn btn-outline-danger btn-sm remove-item-btn"
                        data-index="2"
                        data-field-name="notification_preferences"
                        title="Remove this item">
                    <i class="bi bi-trash"></i>
                </button>
            </div>
            <div class="collapse collapse show" id="notification_preferences_item_2_content">
                <div class="card-body"><div class="row">
                <div class="col-md-6">
                    <div class="field"><div class="field">
<label for="notification_preferences[2].notification_type">Notification Type</label>
<select name="notification_preferences[2].notification_type" id="notification_preferences[2].notification_type"><option value="email" selected>πŸ“§ Email</option>
<option value="sms">πŸ“± SMS</option>
<option value="push">πŸ”” Push Notification</option>
<option value="in_app">πŸ’¬ In-App</option></select>
<div class="help-text">Type of notification</div>
</div></div>
                </div>
                <div class="col-md-6">
                    <div class="field"><div class="field">
<label for="notification_preferences[2].event_category">Event Category</label>
<select name="notification_preferences[2].event_category" id="notification_preferences[2].event_category"><option value="security">πŸ”’ Security Alerts</option>
<option value="updates">πŸ“° Product Updates</option>
<option value="marketing" selected>πŸ“£ Marketing</option>
<option value="reminders">⏰ Reminders</option>
<option value="social">πŸ‘₯ Social Activity</option></select>
<div class="help-text">What triggers this notification?</div>
</div></div>
                </div>
                <div class="col-md-6">
                    <div class="field"><label for="notification_preferences[2].enabled">Enabled</label>
<input name="notification_preferences[2].enabled" id="notification_preferences[2].enabled" value="1" type="checkbox" />
<div class="help-text">Receive these notifications?</div></div>
                </div>
                <div class="col-md-6">
                    <div class="field"><div class="field">
<label for="notification_preferences[2].frequency">Frequency</label>
<select name="notification_preferences[2].frequency" id="notification_preferences[2].frequency"><option value="realtime">⚑ Real-time</option>
<option value="hourly">πŸ• Hourly Digest</option>
<option value="daily">πŸ“… Daily Digest</option>
<option value="weekly" selected>πŸ“† Weekly Digest</option></select>
<div class="help-text">How often to receive notifications?</div>
</div></div>
                </div></div>
                </div>
            </div>
        </div></div>
    <button type="button" class="add-item-btn" data-target="notification_preferences">Add Item</button>
    
<div class="model-list-help">Customize notification settings</div>

    
</div>

<div class="field"><label for="two_factor_enabled">Two-Factor Authentication</label>
<input name="two_factor_enabled" id="two_factor_enabled" checked="checked" value="1" type="checkbox" />
<div class="help-text">Enable 2FA for enhanced security</div></div>
<div class="field"><div class="field">
<label for="session_timeout">Session Timeout (minutes)</label>
<div class="input-with-icon"><span class="input-icon">stopwatch</span>
<select name="session_timeout" id="session_timeout"><option value="15">15 minutes</option>
<option value="30">30 minutes</option>
<option value="60" selected>1 hour</option>
<option value="120">2 hours</option>
<option value="480">8 hours</option>
<option value="1440">24 hours</option></select>
</div>
<div class="help-text">Auto-logout after inactivity</div>
</div></div></div>
</div>

    </div>
</div>

<script>
function switchTab(tabId, buttonElement) {
    const tabLayout = buttonElement.closest('.tab-layout');
    const panels = tabLayout.querySelectorAll('.tab-panel');
    const buttons = tabLayout.querySelectorAll('.tab-button');

    panels.forEach(panel => {
        panel.style.display = 'none';
        panel.setAttribute('aria-hidden', 'true');
    });

    buttons.forEach(button => {
        button.classList.remove('active');
        button.setAttribute('aria-selected', 'false');
    });

    const selectedPanel = document.getElementById(tabId);
    if (selectedPanel) {
        selectedPanel.style.display = 'block';
        selectedPanel.setAttribute('aria-hidden', 'false');
    }

    buttonElement.classList.add('active');
    buttonElement.setAttribute('aria-selected', 'true');
}
</script>
<style>
.tab-layout .tab-navigation {
    border-bottom: 2px solid #e0e0e0;
    margin-bottom: 1rem;
}
.tab-layout .tab-button {
    background: none;
    border: none;
    padding: 0.5rem 1rem;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-right: 0.5rem;
}
.tab-layout .tab-button:hover {
    background-color: #f5f5f5;
}
.tab-layout .tab-button.active {
    border-bottom-color: #007bff;
    color: #007bff;
}
.tab-layout .tab-panel {
    display: none;
}
.tab-layout .tab-panel.active {
    display: block;
}
</style>


    </div>
</section>

    
<button type="submit">Submit</button>
<div style="margin-top: 0.5rem; font-size: 0.75rem; color: #6c757d; text-align: right;">Rendered in 0.073s</div>
</form>


<script>
(function() {
    document.addEventListener('DOMContentLoaded', function() {
        // Prevent Enter key from submitting forms unless on submit button
        const forms = document.querySelectorAll('form.pydantic-form');
        forms.forEach(function(form) {
            form.addEventListener('keydown', function(e) {
                // Check if Enter key is pressed
                if (e.key === 'Enter' || e.keyCode === 13) {
                    const target = e.target;

                    // Allow Enter in textareas (for multi-line input)
                    if (target.tagName === 'TEXTAREA') {
                        return;
                    }

                    // Allow Enter on submit buttons
                    if (target.tagName === 'BUTTON' && target.type === 'submit') {
                        return;
                    }

                    // Allow Enter on input type="submit"
                    if (target.tagName === 'INPUT' && target.type === 'submit') {
                        return;
                    }

                    // Prevent form submission for all other cases
                    e.preventDefault();
                    return false;
                }
            });
        });
    });
})();
</script>
class ComprehensiveTabbedForm(FormModel):
    """
    Wrapper form model containing the comprehensive tabbed layout.

    This form demonstrates:
    - 6 major tabs covering all form capabilities
    - Tab 1: Organization - 5 levels of nesting
    - Tab 2: Kitchen Sink - ALL input types
    - Tab 3: Contact Management - Nested contacts
    - Tab 4: Scheduling - Date/time management
    - Tab 5: Media & Files - Color themes and media
    - Tab 6: Settings - Preferences and notifications
    """

    comprehensive_tabs: ComprehensiveTabbed = FormField(
        default_factory=ComprehensiveTabbed,
        title="Complete Feature Showcase",
        input_type="layout",
        help_text="Explore all 6 tabs to see every feature of Pydantic SchemaForms"
    )
{
  "description": "Wrapper form model containing the comprehensive tabbed layout.\n\nThis form demonstrates:\n- 6 major tabs covering all form capabilities\n- Tab 1: Organization - 5 levels of nesting\n- Tab 2: Kitchen Sink - ALL input types\n- Tab 3: Contact Management - Nested contacts\n- Tab 4: Scheduling - Date/time management\n- Tab 5: Media & Files - Color themes and media\n- Tab 6: Settings - Preferences and notifications",
  "properties": {
    "comprehensive_tabs": {
      "autofocus": false,
      "description": "Explore all 6 tabs to see every feature of Pydantic SchemaForms",
      "disabled": false,
      "help_text": "Explore all 6 tabs to see every feature of Pydantic SchemaForms",
      "input_type": "layout",
      "readonly": false,
      "title": "Complete Feature Showcase"
    }
  },
  "title": "ComprehensiveTabbedForm",
  "type": "object"
}
{
  "comprehensive_tabs": {
    "required": false
  }
}
{
  "errors": {},
  "data": {
    "organization": {
      "company_name": "TechCorp International",
      "company_code": "TECH-2024",
      "headquarters_address": "123 Innovation Drive, San Francisco, CA 94105",
      "ceo_name": "Jane Smith",
      "ceo_email": "jane.smith@techcorp.com",
      "founded_date": "2010-01-15",
      "employee_count": 5000,
      "annual_revenue": 500000000.0,
      "website": "https://www.techcorp.com",
      "departments": [
        {
          "name": "Engineering",
          "description": "Software development and infrastructure",
          "department_head": "John Doe",
          "head_email": "john.doe@techcorp.com",
          "established_date": "2010-06-01",
          "budget": 50000000.0,
          "teams": [
            {
              "name": "Backend Services",
              "description": "API and database services",
              "team_lead": "Alice Johnson",
              "formed_date": "2015-03-01",
              "members": [
                {
                  "name": "Bob Wilson",
                  "email": "bob.wilson@techcorp.com",
                  "role": "Senior Backend Developer",
                  "hire_date": "2016-01-15",
                  "experience_years": 12,
                  "manager": "Alice Johnson",
                  "certifications": [
                    {
                      "name": "AWS Solutions Architect Professional",
                      "issuer": "Amazon Web Services",
                      "issue_date": "2022-05-01",
                      "expiry_date": "2025-05-01",
                      "credential_id": "AWS-12345",
                      "credential_url": "https://aws.amazon.com/verification/12345"
                    },
                    {
                      "name": "Certified Kubernetes Administrator",
                      "issuer": "Cloud Native Computing Foundation",
                      "issue_date": "2023-01-15",
                      "expiry_date": "2026-01-15",
                      "credential_id": "CKA-67890",
                      "credential_url": "https://cncf.io/verify/67890"
                    }
                  ]
                }
              ]
            }
          ],
          "projects": [
            {
              "name": "Microservices Migration",
              "description": "Migrate monolithic application to microservices architecture",
              "status": "in_progress",
              "start_date": "2024-01-01",
              "target_end_date": "2024-12-31",
              "budget": 2000000.0,
              "project_manager": "Carol Lee",
              "tasks": [
                {
                  "title": "Refactor Auth Service",
                  "description": "Extract authentication into standalone microservice",
                  "priority": "high",
                  "status": "in_progress",
                  "start_date": "2024-02-01",
                  "due_date": "2024-03-31",
                  "assigned_to": "Bob Wilson",
                  "estimated_hours": 120.0,
                  "subtasks": [
                    {
                      "title": "Create service skeleton",
                      "description": "Set up FastAPI project structure",
                      "assigned_to": "Bob Wilson",
                      "estimated_hours": 16.0,
                      "status": "completed"
                    }
                  ]
                }
              ]
            }
          ]
        }
      ]
    },
    "kitchen_sink": {
      "text_input": "Sample text value",
      "email_input": "user@example.com",
      "password_input": "SecurePass123!",
      "search_input": "search query",
      "url_input": "https://example.com",
      "tel_input": "+1-555-987-6543",
      "textarea_input": "This is a multi-line\ntext area\nwith sample content.",
      "number_input": 42,
      "decimal_input": 3.14159,
      "range_input": 75,
      "select_input": "option3",
      "radio_input": "large",
      "multiselect_input": [
        "python",
        "typescript",
        "rust"
      ],
      "checkbox_input": true,
      "toggle_input": false,
      "date_input": "2024-06-15",
      "time_input": "14:30",
      "datetime_input": "2024-06-15T14:30:00",
      "color_input": "#e74c3c",
      "hidden_input": "hidden_secret_value"
    },
    "contacts": {
      "first_name": "John",
      "last_name": "Smith",
      "email": "john.smith@example.com",
      "company": "Acme Corporation",
      "job_title": "Senior Software Engineer",
      "birth_date": "1985-04-12",
      "phone_numbers": [
        {
          "phone_type": "mobile",
          "number": "+1 (555) 123-4567",
          "is_primary": true
        },
        {
          "phone_type": "work",
          "number": "+1 (555) 987-6543",
          "is_primary": false
        }
      ],
      "addresses": [
        {
          "address_type": "home",
          "street_line1": "123 Main Street",
          "street_line2": "Apt 4B",
          "city": "San Francisco",
          "state": "CA",
          "postal_code": "94105",
          "country": "US"
        },
        {
          "address_type": "work",
          "street_line1": "456 Corporate Blvd",
          "street_line2": "Suite 200",
          "city": "Palo Alto",
          "state": "CA",
          "postal_code": "94301",
          "country": "US"
        }
      ],
      "notes": "Prefers email communication. Available Monday-Friday 9am-5pm PST."
    },
    "scheduling": {
      "calendar_name": "Work Calendar",
      "timezone": "America/Los_Angeles",
      "default_event_duration": 60,
      "work_start_time": "09:00",
      "work_end_time": "17:00",
      "weekend_days": [
        "saturday",
        "sunday"
      ],
      "recurring_events": [
        {
          "event_name": "Weekly Team Standup",
          "event_type": "meeting",
          "start_date": "2024-01-08",
          "start_time": "10:00",
          "duration_minutes": 30,
          "recurrence_pattern": "weekly",
          "end_date": "2024-12-31",
          "location": "Conference Room A",
          "send_reminder": true
        },
        {
          "event_name": "Monthly All Hands",
          "event_type": "meeting",
          "start_date": "2024-01-15",
          "start_time": "14:00",
          "duration_minutes": 90,
          "recurrence_pattern": "monthly",
          "end_date": null,
          "location": "Main Auditorium",
          "send_reminder": true
        }
      ]
    },
    "media": {
      "profile_picture_url": "https://example.com/avatars/user123.jpg",
      "background_image_url": "https://example.com/backgrounds/abstract.jpg",
      "favicon_color": "#3498db",
      "enable_animations": true,
      "enable_sound": false,
      "video_quality": "1080p",
      "autoplay_videos": false,
      "color_themes": [
        {
          "theme_name": "Ocean Blue",
          "primary_color": "#3498db",
          "secondary_color": "#2ecc71",
          "accent_color": "#e74c3c",
          "background_color": "#ffffff",
          "text_color": "#2c3e50",
          "is_default": true
        },
        {
          "theme_name": "Dark Mode",
          "primary_color": "#1a1a1a",
          "secondary_color": "#34495e",
          "accent_color": "#f39c12",
          "background_color": "#0a0a0a",
          "text_color": "#ecf0f1",
          "is_default": false
        }
      ],
      "max_upload_size_mb": 25
    },
    "settings": {
      "username": "jsmith",
      "display_name": "John Smith",
      "language": "en",
      "ui_theme": "auto",
      "font_size": 16,
      "accessibility_mode": false,
      "compact_view": false,
      "show_tutorials": true,
      "auto_save": true,
      "auto_save_interval": 5,
      "notification_preferences": [
        {
          "notification_type": "email",
          "event_category": "security",
          "enabled": true,
          "frequency": "realtime"
        },
        {
          "notification_type": "push",
          "event_category": "updates",
          "enabled": true,
          "frequency": "daily"
        },
        {
          "notification_type": "email",
          "event_category": "marketing",
          "enabled": false,
          "frequency": "weekly"
        }
      ],
      "two_factor_enabled": true,
      "session_timeout": 60
    },
    "comprehensive_tabs": "<examples.nested_forms_example.ComprehensiveTabbed object at 0x79ac56e24d70>"
  }
}
API Endpoints Available
Schema: GET /api/forms/organization/schema
Render: GET /api/forms/organization/render
Submit: POST /api/forms/organization/submit