                    <div class="dbm-content-header">
                        <div class="dbm-breadcrumb">
                            <a href="<?php echo Config::get('URL'); ?>dbuser/index">Users</a>
                            <span class="separator">/</span>
                            <span>Create User</span>
                        </div>
                        <div class="dbm-title">
                            <h1>Create New User</h1>
                        </div>
                    </div>

                    <div class="dbm-content-body">
                        <div class="dbm-card">
                            <div class="dbm-card-body">
                                <form method="post" action="<?php echo Config::get('URL'); ?>dbuser/create">
                                    <div class="dbm-form-group">
                                        <label class="dbm-form-label">Username</label>
                                        <input type="text" name="username" class="dbm-form-input" required pattern="[a-zA-Z0-9_]+" placeholder="username">
                                    </div>
                                    <div class="dbm-form-group">
                                        <label class="dbm-form-label">Password</label>
                                        <input type="password" name="password" class="dbm-form-input" required placeholder="password">
                                    </div>
                                    <div class="dbm-form-group">
                                        <label class="dbm-form-label">Host</label>
                                        <select name="host" class="dbm-form-select">
                                            <option value="localhost">localhost</option>
                                            <option value="%">% (any host)</option>
                                            <option value="127.0.0.1">127.0.0.1</option>
                                        </select>
                                    </div>

                                    <div class="dbm-form-group">
                                        <label class="dbm-form-label">Privileges</label>
                                        <div style="margin-top: 8px; padding: 12px; background: var(--dbm-bg-secondary); border-radius: var(--dbm-radius);">
                                            <div style="margin-bottom: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--dbm-border);">
                                                <label style="display: flex; align-items: center; gap: 6px; cursor: pointer; font-size: 13px; font-weight: 500; color: var(--dbm-text);">
                                                    <input type="checkbox" name="privileges[]" value="ALL PRIVILEGES" id="all-privs-check"
                                                        onchange="document.querySelectorAll('.priv-checkbox').forEach(cb => { cb.checked = this.checked; cb.disabled = this.checked; })">
                                                    ALL PRIVILEGES (*)
                                                </label>
                                                <small style="color: var(--dbm-text-muted); font-size: 11px; margin-left: 22px;">Grant all privileges on all databases</small>
                                            </div>
                                            <div style="display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px;">
                                                <?php
                                                $all_privileges = ['SELECT', 'INSERT', 'UPDATE', 'DELETE', 'CREATE', 'DROP', 'ALTER', 'INDEX', 'REFERENCES', 'CREATE TEMPORARY TABLES', 'LOCK TABLES', 'EXECUTE', 'CREATE VIEW', 'SHOW VIEW', 'CREATE ROUTINE', 'ALTER ROUTINE', 'EVENT', 'TRIGGER'];
                                                foreach ($all_privileges as $priv):
                                                ?>
                                                    <label style="display: flex; align-items: center; gap: 6px; cursor: pointer; font-size: 12px; color: var(--dbm-text-secondary);">
                                                        <input type="checkbox" name="privileges[]" value="<?php echo $priv; ?>" class="priv-checkbox">
                                                        <?php echo $priv; ?>
                                                    </label>
                                                <?php endforeach; ?>
                                            </div>
                                        </div>
                                    </div>

                                    <div style="margin-top: 20px; display: flex; gap: 8px;">
                                        <button type="submit" name="submit_create_user" class="dbm-btn dbm-btn-success">
                                            <i data-lucide="plus"></i>
                                            Create User
                                        </button>
                                        <a href="<?php echo Config::get('URL'); ?>dbuser/index" class="dbm-btn dbm-btn-secondary">Cancel</a>
                                    </div>
                                </form>
                            </div>
                        </div>
                    </div>
