<div class="space-y-5">
  <div class="flex flex-wrap items-center justify-between gap-3">
    <div>
      <h3 class="text-lg font-semibold text-slate-900">HR & Profile Centre</h3>
      <p class="mt-1 text-sm text-slate-600">Access your profile, leave, payslips, offboarding and alerts from one grouped section.</p>
    </div>
    <a href="/employee/profile" class="af-btn af-btn-secondary">Open Profile</a>
  </div>

  <div class="rounded-2xl border border-slate-200 bg-white p-3 shadow-soft">
    <div class="flex flex-wrap gap-2">
      <button type="button" data-tab="profile" class="employee-portal-tab rounded-xl bg-brand-600 px-3 py-2 text-sm font-semibold text-white">Profile</button>
      <button type="button" data-tab="leave" class="employee-portal-tab rounded-xl border border-slate-300 bg-white px-3 py-2 text-sm font-semibold text-slate-700 hover:bg-slate-50">Leave</button>
      <button type="button" data-tab="payslips" class="employee-portal-tab rounded-xl border border-slate-300 bg-white px-3 py-2 text-sm font-semibold text-slate-700 hover:bg-slate-50">Payslips</button>
      <button type="button" data-tab="offboarding" class="employee-portal-tab rounded-xl border border-slate-300 bg-white px-3 py-2 text-sm font-semibold text-slate-700 hover:bg-slate-50">Offboarding</button>
      <button type="button" data-tab="alerts" class="employee-portal-tab rounded-xl border border-slate-300 bg-white px-3 py-2 text-sm font-semibold text-slate-700 hover:bg-slate-50">Alerts{% if unread_alert_count is defined and unread_alert_count > 0 %}<span class="ml-2 rounded-full bg-red-100 px-2 py-0.5 text-[10px] text-red-700">{{ unread_alert_count }}</span>{% endif %}</button>
    </div>
  </div>

  <section class="grid gap-4 md:grid-cols-2 xl:grid-cols-4">
    <a href="/employee/profile" class="rounded-2xl border border-slate-200 bg-white p-5 shadow-soft hover:border-brand-200">
      <div class="text-xs font-semibold uppercase text-slate-500">Profile</div>
      <h4 class="mt-2 text-base font-semibold text-slate-900">My Profile</h4>
      <p class="mt-1 text-sm text-slate-600">View employee master details, contact details and emergency contact.</p>
    </a>
    <a href="/employee/leave" class="rounded-2xl border border-slate-200 bg-white p-5 shadow-soft hover:border-brand-200">
      <div class="text-xs font-semibold uppercase text-slate-500">Leave</div>
      <h4 class="mt-2 text-base font-semibold text-slate-900">My Leave</h4>
      <p class="mt-1 text-sm text-slate-600">View leave balances and request history.</p>
    </a>
    <a href="/employee/payslips" class="rounded-2xl border border-slate-200 bg-white p-5 shadow-soft hover:border-brand-200">
      <div class="text-xs font-semibold uppercase text-slate-500">Payroll</div>
      <h4 class="mt-2 text-base font-semibold text-slate-900">My Payslips</h4>
      <p class="mt-1 text-sm text-slate-600">Open available payslips and payroll status.</p>
    </a>
    <a href="/alerts" class="rounded-2xl border border-slate-200 bg-white p-5 shadow-soft hover:border-brand-200">
      <div class="text-xs font-semibold uppercase text-slate-500">Alerts</div>
      <h4 class="mt-2 text-base font-semibold text-slate-900">My Alerts</h4>
      <p class="mt-1 text-sm text-slate-600">Check task, attendance, leave and system alerts.</p>
    </a>
  </section>

  {% include "modules/employees/templates/employees/portal_partials/profile.html" %}
</div>
