{% if not employee %}
<div class="rounded-2xl border border-amber-200 bg-amber-50 p-6 text-sm text-amber-900 shadow-soft">Your login is not linked to an employee profile yet. <a href="/employee/register" class="font-semibold underline">Request employee profile</a>.</div>
{% else %}
<div class="flex flex-wrap items-center justify-between gap-3">
  <div><h3 class="text-lg font-semibold text-slate-900">My Profile</h3><p class="mt-1 text-sm text-slate-600">Your employee master and public profile details.</p></div>
  <a href="/employee/profile" class="af-btn af-btn-primary">Open / Update Profile</a>
</div>
<div class="grid gap-6 lg:grid-cols-2">
  <div class="af-card">
    <h3 class="font-semibold text-slate-900">Employment Details</h3>
    <dl class="mt-4 grid gap-4 text-sm">
      <div><dt class="text-slate-500">Name</dt><dd class="font-medium text-slate-900">{{ employee.full_name }}</dd></div>
      <div><dt class="text-slate-500">Employee Code</dt><dd class="font-medium text-slate-900">{{ employee.employee_code }}</dd></div>
      <div><dt class="text-slate-500">Status</dt><dd class="font-medium text-slate-900">{{ employee.status.replace('_',' ').title() }}</dd></div>
      <div><dt class="text-slate-500">Designation</dt><dd class="font-medium text-slate-900">{{ employee.designation or '-' }}</dd></div>
      <div><dt class="text-slate-500">Department</dt><dd class="font-medium text-slate-900">{{ employee.department or '-' }}</dd></div>
      <div><dt class="text-slate-500">Date of Joining</dt><dd class="font-medium text-slate-900">{{ employee.date_of_joining or '-' }}</dd></div>
    </dl>
  </div>
  <div class="af-card">
    <h3 class="font-semibold text-slate-900">Contact Details</h3>
    <dl class="mt-4 grid gap-4 text-sm">
      <div><dt class="text-slate-500">Email</dt><dd class="font-medium text-slate-900">{{ employee.email or current_user.email }}</dd></div>
      <div><dt class="text-slate-500">Mobile</dt><dd class="font-medium text-slate-900">{{ employee.mobile or current_user.mobile or '-' }}</dd></div>
      <div><dt class="text-slate-500">Alternate Mobile</dt><dd class="font-medium text-slate-900">{{ employee.alternate_mobile or '-' }}</dd></div>
      <div><dt class="text-slate-500">Address</dt><dd class="font-medium text-slate-900">{{ employee.address or '-' }}</dd></div>
      <div><dt class="text-slate-500">Emergency Contact</dt><dd class="font-medium text-slate-900">{{ employee.emergency_contact_name or '-' }} {{ employee.emergency_contact_mobile or '' }}</dd></div>
    </dl>
  </div>
</div>
{% endif %}
