<div class="rounded-2xl border border-border bg-card shadow-sm">
	<div class="flex flex-wrap items-center justify-between gap-3 border-b border-slate-200 dark:border-slate-700 px-5 py-4">
		<div>
			<h3 class="text-sm font-semibold text-slate-900 dark:text-slate-100"><?= lang('notes') ?></h3>
			<p class="text-xs text-slate-500"><?= lang('client') ?> • <?= html_escape($client_details->name ?? '') ?></p>
		</div>
	</div>
	<div class="p-5 space-y-4">
		<?php if (!empty($client_notes)) { ?>
			<?php foreach ($client_notes as $v_notes) { ?>
				<div class="rounded-xl border border-slate-200 bg-white p-4 shadow-sm dark:border-slate-700 dark:bg-slate-900">
					<div class="flex items-start justify-between gap-3">
						<div>
							<a class="text-sm font-semibold text-indigo-600 hover:text-indigo-500"
								href="<?= base_url() ?>admin/client/details/<?= $client_details->client_id . '/notes/' . $v_notes->notes_id ?>">
								<?= html_escape($v_notes->notes) ?>
							</a>
							<div class="mt-1 text-xs text-slate-500"><?= display_datetime($v_notes->last_update, true) ?></div>
						</div>
						<div class="flex items-center gap-2">
							<?= btn_edit('admin/client/details/' . $client_details->client_id . '/notes/' . $v_notes->notes_id) ?>
							<?= btn_delete_ajax('admin/client/delete_notes/' . $v_notes->notes_id . '/' . $client_details->client_id) ?>
						</div>
					</div>
				</div>
			<?php } ?>
		<?php } else { ?>
			<div class="rounded-xl border border-dashed border-slate-200 p-6 text-center text-sm text-slate-500">
				<?= lang('no_record_found') ?>
			</div>
		<?php } ?>
	</div>
</div>
