"use client";

import { useEffect, useState } from "react";
import Link from "next/link";

type Hero = {
  id: number;
  badge: string | null;
  title: string;
  highlight: string | null;
  description: string | null;
  active: boolean;
};

export default function HeroAdminPage() {
  const [heroes, setHeroes] = useState<Hero[]>([]);
  const [loading, setLoading] = useState(true);
  const [sidebarOpen, setSidebarOpen] = useState(false);

  const getHeroes = async () => {
    try {
      setLoading(true);

      const response = await fetch("/api/hero", {
        method: "GET",
        cache: "no-store",
      });

      const result = await response.json();

      if (result.success) {
        setHeroes(result.data);
      } else {
        console.error(result.message || "Gagal mengambil data Hero");
      }
    } catch (error) {
      console.error("Gagal mengambil data hero:", error);
    } finally {
      setLoading(false);
    }
  };

  useEffect(() => {
    getHeroes();
  }, []);

  const deleteHero = async (id: number) => {
    const confirmed = window.confirm(
      "Apakah Anda yakin ingin menghapus Hero ini?"
    );

    if (!confirmed) {
      return;
    }

    try {
      const response = await fetch(`/api/hero?id=${id}`, {
        method: "DELETE",
      });

      const result = await response.json();

      if (!response.ok || !result.success) {
        alert(result.message || "Gagal menghapus Hero");
        return;
      }

      alert("Hero berhasil dihapus");

      await getHeroes();
    } catch (error) {
      console.error("DELETE HERO ERROR:", error);
      alert("Terjadi kesalahan saat menghapus Hero");
    }
  };

  const closeSidebar = () => {
    setSidebarOpen(false);
  };

  return (
    <>
      <style>{`
        * {
          box-sizing: border-box;
        }

        html,
        body {
          margin: 0;
          padding: 0;
          max-width: 100%;
          overflow-x: hidden;
        }

        body {
          background: #f5f7fb;
        }

        button,
        a {
          -webkit-tap-highlight-color: transparent;
        }

        .hero-admin-page {
          min-height: 100vh;
          width: 100%;
          background: #f5f7fb;
          color: #1f2937;
        }

        .admin-layout {
          min-height: 100vh;
          width: 100%;
          display: flex;
          position: relative;
        }

        /* =========================================================
           SIDEBAR
        ========================================================= */

        .admin-sidebar {
          width: 270px;
          min-width: 270px;
          height: 100vh;
          position: fixed;
          top: 0;
          left: 0;
          z-index: 1050;
          background: #ffffff;
          border-right: 1px solid #e8ecf1;
          transition: transform 0.3s ease;
        }

        .sidebar-inner {
          height: 100%;
          display: flex;
          flex-direction: column;
          padding: 24px 16px;
          overflow-y: auto;
          overflow-x: hidden;
        }

        .sidebar-brand {
          display: flex;
          align-items: center;
          gap: 12px;
          padding: 4px 10px 28px;
          border-bottom: 1px solid #edf0f4;
          margin-bottom: 22px;
        }

        .brand-icon {
          width: 42px;
          height: 42px;
          min-width: 42px;
          border-radius: 12px;
          display: flex;
          align-items: center;
          justify-content: center;
          background: linear-gradient(
            135deg,
            #198754,
            #20c997
          );
          color: #ffffff;
          font-size: 18px;
          box-shadow: 0 8px 20px rgba(25, 135, 84, 0.2);
        }

        .brand-text {
          min-width: 0;
        }

        .brand-text strong {
          display: block;
          font-size: 16px;
          line-height: 1.2;
          color: #17202a;
        }

        .brand-text span {
          display: block;
          margin-top: 3px;
          font-size: 11px;
          color: #8b95a5;
          font-weight: 600;
          letter-spacing: 0.08em;
          text-transform: uppercase;
        }

        .sidebar-close {
          margin-left: auto;
          border: 0;
          background: transparent;
          color: #7b8492;
          font-size: 17px;
          cursor: pointer;
          padding: 5px;
        }

        .sidebar-section-label {
          padding: 0 12px;
          margin-bottom: 8px;
          color: #9aa3af;
          font-size: 10px;
          font-weight: 700;
          letter-spacing: 0.1em;
        }

        .sidebar-nav {
          display: flex;
          flex-direction: column;
          gap: 4px;
        }

        .sidebar-link {
          display: flex;
          align-items: center;
          gap: 12px;
          min-height: 44px;
          padding: 10px 12px;
          border-radius: 11px;
          color: #697386;
          text-decoration: none;
          font-size: 14px;
          font-weight: 500;
          transition:
            background 0.2s ease,
            color 0.2s ease,
            transform 0.2s ease;
        }

        .sidebar-link:hover {
          background: #f0f8f4;
          color: #198754;
          transform: translateX(2px);
        }

        .sidebar-link.active {
          background: linear-gradient(
            90deg,
            rgba(25, 135, 84, 0.12),
            rgba(25, 135, 84, 0.06)
          );
          color: #198754;
          font-weight: 700;
        }

        .sidebar-link-icon {
          width: 23px;
          min-width: 23px;
          text-align: center;
          font-size: 16px;
          flex-shrink: 0;
        }

        .sidebar-bottom {
          margin-top: auto;
          padding-top: 18px;
          border-top: 1px solid #edf0f4;
        }

        .sidebar-bottom a {
          display: flex;
          align-items: center;
          gap: 10px;
          padding: 11px 12px;
          border-radius: 10px;
          color: #6b7280;
          text-decoration: none;
          font-size: 13px;
          transition: 0.2s ease;
        }

        .sidebar-bottom a:hover {
          background: #f5f7fa;
          color: #198754;
        }

        /* =========================================================
           MAIN
        ========================================================= */

        .admin-main {
          width: calc(100% - 270px);
          margin-left: 270px;
          min-width: 0;
        }

        /* =========================================================
           TOPBAR
        ========================================================= */

        .admin-topbar {
          width: 100%;
          height: 76px;
          background: rgba(255, 255, 255, 0.96);
          border-bottom: 1px solid #e9edf2;
          display: flex;
          align-items: center;
          justify-content: space-between;
          gap: 15px;
          padding: 0 34px;
          position: sticky;
          top: 0;
          z-index: 900;
          backdrop-filter: blur(12px);
        }

        .topbar-left {
          display: flex;
          align-items: center;
          gap: 14px;
          min-width: 0;
        }

        .mobile-menu-button {
          width: 40px;
          height: 40px;
          border: 1px solid #e2e7ed;
          background: #ffffff;
          border-radius: 10px;
          color: #344054;
          font-size: 18px;
          cursor: pointer;
          transition: 0.2s ease;
          flex-shrink: 0;
        }

        .mobile-menu-button:hover {
          background: #f5f8f6;
          color: #198754;
          border-color: #cde5d7;
        }

        .topbar-left > div:last-child {
          min-width: 0;
        }

        .topbar-label {
          color: #9aa3af;
          font-size: 10px;
          font-weight: 700;
          letter-spacing: 0.1em;
          margin-bottom: 3px;
        }

        .topbar-title {
          color: #17202a;
          font-size: 15px;
          font-weight: 700;
          white-space: nowrap;
        }

        .topbar-right {
          display: flex;
          align-items: center;
          gap: 10px;
          flex-shrink: 0;
        }

        .topbar-website,
        .topbar-logout {
          min-height: 40px;
          display: inline-flex;
          align-items: center;
          justify-content: center;
          gap: 8px;
          border-radius: 10px;
          padding: 8px 13px;
          text-decoration: none;
          font-size: 13px;
          font-weight: 600;
          transition: 0.2s ease;
          white-space: nowrap;
        }

        .topbar-website {
          color: #667085;
          border: 1px solid #e4e8ed;
          background: #ffffff;
        }

        .topbar-website:hover {
          color: #198754;
          border-color: #b7ddca;
          background: #f4fbf7;
        }

        .topbar-logout {
          color: #dc3545;
          border: 1px solid #f1c4c9;
          background: #ffffff;
        }

        .topbar-logout:hover {
          background: #fff5f6;
          border-color: #e8aeb5;
        }

        /* =========================================================
           CONTENT
        ========================================================= */

        .admin-content {
          width: 100%;
          max-width: 1550px;
          margin: 0 auto;
          padding: 34px;
          animation: contentEnter 0.45s ease both;
        }

        @keyframes contentEnter {
          from {
            opacity: 0;
            transform: translateY(10px);
          }

          to {
            opacity: 1;
            transform: translateY(0);
          }
        }

        /* =========================================================
           PAGE HEADER
        ========================================================= */

        .page-header {
          display: flex;
          align-items: flex-end;
          justify-content: space-between;
          gap: 25px;
          margin-bottom: 28px;
        }

        .page-header-left {
          min-width: 0;
          flex: 1;
        }

        .page-eyebrow {
          display: flex;
          align-items: center;
          gap: 7px;
          color: #198754;
          font-size: 10px;
          font-weight: 800;
          letter-spacing: 0.11em;
          margin-bottom: 8px;
        }

        .page-eyebrow-dot {
          width: 6px;
          height: 6px;
          border-radius: 50%;
          background: #20c997;
          flex-shrink: 0;
        }

        .page-title-row {
          display: flex;
          align-items: flex-start;
          gap: 15px;
        }

        .page-title-icon {
          width: 56px;
          height: 56px;
          min-width: 56px;
          border-radius: 15px;
          background: linear-gradient(
            135deg,
            rgba(25, 135, 84, 0.13),
            rgba(32, 201, 151, 0.08)
          );
          color: #198754;
          display: flex;
          align-items: center;
          justify-content: center;
          font-size: 23px;
          flex-shrink: 0;
        }

        .page-title {
          margin: 0;
          font-size: clamp(26px, 3vw, 35px);
          font-weight: 800;
          letter-spacing: -0.025em;
          color: #182230;
          line-height: 1.15;
        }

        /*
         * SEMUA TEKS DESKRIPSI JUSTIFY
         */
        .page-description {
          margin: 8px 0 0;
          color: #7a8493;
          font-size: 13px;
          line-height: 1.7;
          max-width: 720px;
          text-align: justify;
          text-justify: inter-word;
          overflow-wrap: anywhere;
        }

        .add-button {
          min-height: 46px;
          display: inline-flex;
          align-items: center;
          justify-content: center;
          gap: 8px;
          padding: 10px 17px;
          border-radius: 11px;
          color: #ffffff;
          background: linear-gradient(
            135deg,
            #198754,
            #20a46c
          );
          border: 1px solid #198754;
          text-decoration: none;
          font-size: 13px;
          font-weight: 700;
          white-space: nowrap;
          box-shadow: 0 8px 18px rgba(25, 135, 84, 0.17);
          transition: 0.2s ease;
          flex-shrink: 0;
        }

        .add-button:hover {
          color: #ffffff;
          transform: translateY(-1px);
          box-shadow: 0 11px 23px rgba(25, 135, 84, 0.25);
        }

        /* =========================================================
           SUMMARY
        ========================================================= */

        .summary-grid {
          display: grid;
          grid-template-columns: repeat(3, minmax(0, 1fr));
          gap: 15px;
          margin-bottom: 22px;
        }

        .summary-card {
          min-width: 0;
          background: #ffffff;
          border: 1px solid #e7ebef;
          border-radius: 15px;
          padding: 17px 18px;
          display: flex;
          align-items: center;
          gap: 13px;
          box-shadow:
            0 5px 20px rgba(20, 30, 45, 0.035),
            0 1px 4px rgba(20, 30, 45, 0.025);
        }

        .summary-icon {
          width: 42px;
          height: 42px;
          min-width: 42px;
          border-radius: 11px;
          display: flex;
          align-items: center;
          justify-content: center;
          background: #eaf7f0;
          color: #198754;
          font-size: 17px;
          flex-shrink: 0;
        }

        .summary-label {
          color: #929baa;
          font-size: 10px;
          font-weight: 700;
          letter-spacing: 0.04em;
          text-transform: uppercase;
          margin-bottom: 2px;
        }

        .summary-value {
          color: #202b38;
          font-size: 19px;
          font-weight: 800;
        }

        /* =========================================================
           TABLE CARD
        ========================================================= */

        .table-card {
          width: 100%;
          min-width: 0;
          background: #ffffff;
          border: 1px solid #e5e9ee;
          border-radius: 18px;
          overflow: hidden;
          box-shadow:
            0 8px 30px rgba(20, 30, 45, 0.045),
            0 2px 8px rgba(20, 30, 45, 0.025);
        }

        .table-card-header {
          min-height: 72px;
          padding: 16px 22px;
          display: flex;
          align-items: center;
          justify-content: space-between;
          gap: 15px;
          border-bottom: 1px solid #edf0f3;
          background: linear-gradient(
            180deg,
            #ffffff 0%,
            #fcfdfd 100%
          );
        }

        .table-heading-left {
          display: flex;
          align-items: center;
          gap: 12px;
          min-width: 0;
        }

        .table-heading-icon {
          width: 40px;
          height: 40px;
          min-width: 40px;
          border-radius: 10px;
          display: flex;
          align-items: center;
          justify-content: center;
          background: #f0f8f4;
          color: #198754;
          font-size: 17px;
          flex-shrink: 0;
        }

        .table-heading-left > div:last-child {
          min-width: 0;
        }

        .table-heading-title {
          margin: 0;
          color: #202b38;
          font-size: 14px;
          font-weight: 800;
        }

        /*
         * TEKS DESKRIPSI TABLE JUSTIFY
         */
        .table-heading-description {
          margin: 3px 0 0;
          color: #9aa3af;
          font-size: 11px;
          line-height: 1.6;
          text-align: justify;
          text-justify: inter-word;
          overflow-wrap: anywhere;
        }

        .record-count {
          display: inline-flex;
          align-items: center;
          gap: 6px;
          padding: 7px 10px;
          border-radius: 8px;
          background: #f4f7f9;
          color: #697386;
          font-size: 10px;
          font-weight: 700;
          white-space: nowrap;
          flex-shrink: 0;
        }

        /* =========================================================
           DESKTOP TABLE
        ========================================================= */

        .table-scroll {
          width: 100%;
          max-width: 100%;
          overflow-x: auto;
          overflow-y: hidden;
          -webkit-overflow-scrolling: touch;
          scrollbar-width: thin;
        }

        .hero-table {
          width: 100%;
          min-width: 950px;
          margin: 0;
          border-collapse: separate;
          border-spacing: 0;
          table-layout: auto;
        }

        .hero-table thead th {
          padding: 14px 18px;
          background: #f8fafb;
          border-bottom: 1px solid #e8edf1;
          color: #7b8492;
          font-size: 10px;
          font-weight: 800;
          letter-spacing: 0.055em;
          text-transform: uppercase;
          white-space: nowrap;
        }

        .hero-table tbody td {
          padding: 17px 18px;
          border-bottom: 1px solid #edf0f3;
          color: #475467;
          font-size: 12px;
          vertical-align: middle;
        }

        .hero-table tbody tr:last-child td {
          border-bottom: 0;
        }

        .hero-table tbody tr {
          transition: background 0.18s ease;
        }

        .hero-table tbody tr:hover {
          background: #fbfdfc;
        }

        .id-badge {
          display: inline-flex;
          align-items: center;
          justify-content: center;
          min-width: 34px;
          height: 28px;
          padding: 0 8px;
          border-radius: 8px;
          background: #f3f5f7;
          color: #667085;
          font-size: 11px;
          font-weight: 700;
        }

        .hero-badge {
          display: inline-flex;
          align-items: center;
          max-width: 180px;
          padding: 7px 10px;
          border-radius: 8px;
          background: #eaf7f0;
          color: #198754;
          font-size: 10px;
          font-weight: 700;
          white-space: nowrap;
          overflow: hidden;
          text-overflow: ellipsis;
        }

        .hero-title-cell {
          min-width: 230px;
          max-width: 390px;
        }

        .hero-title {
          color: #202b38;
          font-size: 13px;
          font-weight: 800;
          line-height: 1.45;
          margin-bottom: 3px;
          overflow-wrap: anywhere;
          text-align: justify;
          text-justify: inter-word;
        }

        .hero-highlight {
          color: #198754;
          font-size: 11px;
          font-weight: 600;
          line-height: 1.5;
          overflow-wrap: anywhere;
          text-align: justify;
          text-justify: inter-word;
        }

        /*
         * DESCRIPTION TABLE JUSTIFY
         */
        .hero-description {
          width: 100%;
          max-width: 310px;
          color: #8a93a0;
          font-size: 11px;
          line-height: 1.6;
          display: -webkit-box;
          -webkit-line-clamp: 2;
          -webkit-box-orient: vertical;
          overflow: hidden;
          overflow-wrap: anywhere;
          text-align: justify;
          text-justify: inter-word;
        }

        .status-badge {
          display: inline-flex;
          align-items: center;
          gap: 6px;
          padding: 7px 10px;
          border-radius: 8px;
          font-size: 10px;
          font-weight: 700;
          white-space: nowrap;
        }

        .status-badge.active {
          background: #eaf7f0;
          color: #198754;
        }

        .status-badge.inactive {
          background: #f1f3f5;
          color: #7b8492;
        }

        .status-dot {
          width: 6px;
          height: 6px;
          border-radius: 50%;
          background: currentColor;
          flex-shrink: 0;
        }

        .action-cell {
          text-align: right;
          white-space: nowrap;
        }

        .action-buttons {
          display: inline-flex;
          align-items: center;
          justify-content: flex-end;
          gap: 7px;
        }

        .action-button {
          min-height: 34px;
          display: inline-flex;
          align-items: center;
          justify-content: center;
          gap: 6px;
          padding: 7px 10px;
          border-radius: 8px;
          background: #ffffff;
          font-size: 10px;
          font-weight: 700;
          cursor: pointer;
          transition: 0.2s ease;
          text-decoration: none;
          white-space: nowrap;
        }

        .edit-button {
          color: #0d6efd;
          border: 1px solid #c9dcfa;
        }

        .edit-button:hover {
          color: #0b5ed7;
          background: #f3f7ff;
          border-color: #9fc2f5;
        }

        .delete-button {
          color: #dc3545;
          border: 1px solid #f1c4c9;
        }

        .delete-button:hover {
          color: #bb2d3b;
          background: #fff5f6;
          border-color: #e8aeb5;
        }

        /* =========================================================
           MOBILE CARD VIEW
        ========================================================= */

        .mobile-hero-list {
          display: none;
        }

        .mobile-hero-card {
          background: #ffffff;
          border: 1px solid #e7ebef;
          border-radius: 14px;
          padding: 15px;
          box-shadow:
            0 4px 16px rgba(20, 30, 45, 0.035),
            0 1px 3px rgba(20, 30, 45, 0.025);
        }

        .mobile-hero-card + .mobile-hero-card {
          margin-top: 10px;
        }

        .mobile-card-top {
          display: flex;
          align-items: center;
          justify-content: space-between;
          gap: 10px;
          padding-bottom: 13px;
          border-bottom: 1px solid #edf0f3;
        }

        .mobile-card-id {
          display: flex;
          align-items: center;
          gap: 8px;
          min-width: 0;
        }

        .mobile-card-id-label {
          color: #9aa3af;
          font-size: 9px;
          font-weight: 700;
          text-transform: uppercase;
          letter-spacing: 0.05em;
        }

        .mobile-card-id-value {
          color: #475467;
          font-size: 11px;
          font-weight: 800;
        }

        .mobile-card-status {
          flex-shrink: 0;
        }

        .mobile-card-section {
          padding-top: 14px;
        }

        .mobile-card-label {
          display: block;
          color: #9aa3af;
          font-size: 9px;
          font-weight: 800;
          letter-spacing: 0.07em;
          text-transform: uppercase;
          margin-bottom: 6px;
        }

        .mobile-card-badge {
          display: inline-flex;
          max-width: 100%;
          padding: 6px 9px;
          border-radius: 8px;
          background: #eaf7f0;
          color: #198754;
          font-size: 10px;
          line-height: 1.4;
          font-weight: 700;
          overflow-wrap: anywhere;
        }

        .mobile-card-title {
          color: #202b38;
          font-size: 14px;
          font-weight: 800;
          line-height: 1.5;
          overflow-wrap: anywhere;
          text-align: justify;
          text-justify: inter-word;
        }

        .mobile-card-highlight {
          margin-top: 5px;
          color: #198754;
          font-size: 11px;
          font-weight: 600;
          line-height: 1.55;
          overflow-wrap: anywhere;
          text-align: justify;
          text-justify: inter-word;
        }

        .mobile-card-highlight i {
          margin-right: 4px;
        }

        /*
         * MOBILE DESCRIPTION JUSTIFY
         */
        .mobile-card-description {
          color: #7f8997;
          font-size: 11px;
          line-height: 1.65;
          overflow-wrap: anywhere;
          text-align: justify;
          text-justify: inter-word;
        }

        .mobile-card-description.empty {
          color: #a0a7b1;
        }

        .mobile-card-actions {
          display: grid;
          grid-template-columns: 1fr 1fr;
          gap: 8px;
          padding-top: 15px;
          margin-top: 15px;
          border-top: 1px solid #edf0f3;
        }

        .mobile-action-button {
          min-height: 40px;
          display: inline-flex;
          align-items: center;
          justify-content: center;
          gap: 7px;
          padding: 9px 10px;
          border-radius: 9px;
          background: #ffffff;
          text-decoration: none;
          font-size: 11px;
          font-weight: 700;
          cursor: pointer;
          transition: 0.2s ease;
        }

        .mobile-edit-button {
          color: #0d6efd;
          border: 1px solid #c9dcfa;
        }

        .mobile-edit-button:hover {
          color: #0b5ed7;
          background: #f3f7ff;
        }

        .mobile-delete-button {
          color: #dc3545;
          border: 1px solid #f1c4c9;
        }

        .mobile-delete-button:hover {
          color: #bb2d3b;
          background: #fff5f6;
        }

        /* =========================================================
           TABLE FOOTER
        ========================================================= */

        .table-card-footer {
          padding: 13px 20px;
          border-top: 1px solid #edf0f3;
          background: #fcfdfd;
          display: flex;
          align-items: center;
          justify-content: space-between;
          gap: 15px;
          color: #9aa3af;
          font-size: 10px;
        }

        .table-footer-info {
          display: flex;
          align-items: center;
          gap: 7px;
        }

        .table-footer-info i {
          color: #198754;
        }

        .scroll-hint {
          display: none;
          align-items: center;
          gap: 5px;
        }

        /* =========================================================
           LOADING
        ========================================================= */

        .loading-state {
          min-height: 360px;
          display: flex;
          flex-direction: column;
          align-items: center;
          justify-content: center;
          padding: 40px 20px;
        }

        .loading-icon {
          width: 54px;
          height: 54px;
          border-radius: 15px;
          display: flex;
          align-items: center;
          justify-content: center;
          background: #eaf7f0;
          color: #198754;
          margin-bottom: 15px;
        }

        .loading-state p {
          color: #7a8493;
          font-size: 12px;
          margin: 0;
          text-align: justify;
          text-justify: inter-word;
        }

        /* =========================================================
           EMPTY STATE
        ========================================================= */

        .empty-state {
          min-height: 360px;
          display: flex;
          flex-direction: column;
          align-items: center;
          justify-content: center;
          padding: 40px 20px;
          text-align: center;
        }

        .empty-icon {
          width: 65px;
          height: 65px;
          border-radius: 18px;
          display: flex;
          align-items: center;
          justify-content: center;
          background: #fff7e6;
          color: #d99a00;
          font-size: 25px;
          margin-bottom: 17px;
        }

        .empty-title {
          margin: 0 0 6px;
          color: #263241;
          font-size: 16px;
          font-weight: 800;
        }

        .empty-description {
          max-width: 430px;
          margin: 0 0 18px;
          color: #929baa;
          font-size: 11px;
          line-height: 1.65;
          text-align: justify;
          text-justify: inter-word;
          overflow-wrap: anywhere;
        }

        .empty-button {
          min-height: 40px;
          display: inline-flex;
          align-items: center;
          gap: 7px;
          padding: 8px 13px;
          border-radius: 9px;
          background: #198754;
          border: 1px solid #198754;
          color: #ffffff;
          text-decoration: none;
          font-size: 11px;
          font-weight: 700;
        }

        .empty-button:hover {
          color: #ffffff;
          background: #157347;
        }

        /* =========================================================
           PAGE FOOTER
        ========================================================= */

        .admin-page-footer {
          padding: 20px 2px 5px;
          display: flex;
          align-items: center;
          justify-content: space-between;
          gap: 15px;
          color: #9aa3af;
          font-size: 10px;
        }

        .admin-page-footer div {
          display: flex;
          align-items: center;
          gap: 7px;
        }

        .admin-page-footer i {
          color: #198754;
        }

        .admin-page-footer a {
          display: inline-flex;
          align-items: center;
          color: #7b8492;
          text-decoration: none;
          font-weight: 600;
        }

        .admin-page-footer a:hover {
          color: #198754;
        }

        /* =========================================================
           SIDEBAR OVERLAY
        ========================================================= */

        .sidebar-overlay {
          display: none;
        }

        /* =========================================================
           LARGE DESKTOP
        ========================================================= */

        @media (max-width: 1399.98px) {
          .admin-content {
            padding: 30px;
          }

          .hero-table {
            min-width: 930px;
          }
        }

        /* =========================================================
           TABLET / LAPTOP
        ========================================================= */

        @media (max-width: 1199.98px) {
          .admin-content {
            padding: 28px;
          }

          .page-header {
            align-items: flex-start;
          }

          .summary-grid {
            grid-template-columns: repeat(3, minmax(0, 1fr));
          }

          .hero-table {
            min-width: 900px;
          }
        }

        /* =========================================================
           MOBILE SIDEBAR
        ========================================================= */

        @media (max-width: 991.98px) {
          .admin-sidebar {
            transform: translateX(-100%);
            box-shadow: 15px 0 40px rgba(20, 30, 45, 0.1);
          }

          .admin-sidebar.open {
            transform: translateX(0);
          }

          .admin-main {
            width: 100%;
            margin-left: 0;
          }

          .sidebar-overlay {
            position: fixed;
            inset: 0;
            z-index: 1040;
            display: block;
            background: rgba(15, 23, 42, 0.35);
            backdrop-filter: blur(2px);
          }

          .admin-topbar {
            padding: 0 24px;
          }

          .page-header {
            flex-direction: column;
            align-items: stretch;
          }

          .add-button {
            align-self: flex-start;
          }
        }

        /* =========================================================
           TABLET
        ========================================================= */

        @media (max-width: 767.98px) {
          .admin-topbar {
            height: 68px;
            padding: 0 16px;
          }

          .topbar-title {
            font-size: 13px;
          }

          .admin-content {
            width: 100%;
            max-width: 100%;
            padding: 22px 16px;
          }

          .page-header {
            margin-bottom: 22px;
          }

          .page-title-row {
            gap: 12px;
          }

          .page-title-icon {
            width: 48px;
            height: 48px;
            min-width: 48px;
            border-radius: 13px;
            font-size: 20px;
          }

          .page-title {
            font-size: 26px;
          }

          /*
           * TETAP JUSTIFY PADA TABLET
           */
          .page-description {
            font-size: 11px;
            line-height: 1.7;
            text-align: justify;
            text-justify: inter-word;
          }

          .add-button {
            width: 100%;
            min-height: 44px;
          }

          .summary-grid {
            grid-template-columns: 1fr;
            gap: 10px;
            margin-bottom: 17px;
          }

          .summary-card {
            padding: 14px;
          }

          .table-card {
            border-radius: 15px;
          }

          .table-card-header {
            padding: 15px 16px;
            min-height: 65px;
          }

          .table-heading-icon {
            width: 37px;
            height: 37px;
            min-width: 37px;
          }

          .table-heading-title {
            font-size: 13px;
          }

          .table-heading-description {
            font-size: 10px;
            text-align: justify;
            text-justify: inter-word;
          }

          .record-count {
            padding: 6px 8px;
            font-size: 9px;
          }

          .hero-table {
            min-width: 880px;
          }

          .hero-table thead th {
            padding: 12px 14px;
          }

          .hero-table tbody td {
            padding: 14px;
          }

          .scroll-hint {
            display: inline-flex;
          }

          .table-card-footer {
            padding: 11px 14px;
            align-items: flex-start;
            flex-direction: column;
            gap: 6px;
          }

          .admin-page-footer {
            flex-direction: column;
            align-items: flex-start;
            padding-top: 17px;
          }
        }

        /* =========================================================
           MOBILE
        ========================================================= */

        @media (max-width: 575.98px) {
          .admin-content {
            padding: 19px 12px;
          }

          .admin-topbar {
            padding-left: 12px;
            padding-right: 12px;
          }

          .topbar-left {
            gap: 9px;
          }

          .topbar-right {
            gap: 6px;
          }

          .topbar-website,
          .topbar-logout {
            width: 38px;
            height: 38px;
            min-height: 38px;
            padding: 0;
            border-radius: 9px;
          }

          .mobile-menu-button {
            width: 38px;
            height: 38px;
          }

          .page-title-row {
            align-items: flex-start;
            gap: 10px;
          }

          .page-title-icon {
            width: 43px;
            height: 43px;
            min-width: 43px;
            border-radius: 11px;
            font-size: 17px;
          }

          .page-title {
            font-size: 23px;
          }

          /*
           * JUSTIFY TETAP AKTIF DI MOBILE
           */
          .page-description {
            font-size: 10px;
            line-height: 1.7;
            text-align: justify;
            text-justify: inter-word;
          }

          .summary-card {
            border-radius: 12px;
          }

          .summary-icon {
            width: 38px;
            height: 38px;
            min-width: 38px;
          }

          .summary-value {
            font-size: 17px;
          }

          .table-card {
            overflow: hidden;
          }

          .table-card-header {
            padding: 14px;
          }

          .table-heading-description {
            display: none;
          }

          .record-count {
            display: none;
          }

          .table-scroll {
            display: none;
          }

          .mobile-hero-list {
            display: block;
            padding: 12px;
            background: #f9fafb;
          }

          .mobile-hero-card {
            padding: 14px;
            border-radius: 13px;
          }

          .mobile-card-title {
            font-size: 13px;
            text-align: justify;
            text-justify: inter-word;
          }

          .mobile-card-highlight {
            font-size: 10px;
            text-align: justify;
            text-justify: inter-word;
          }

          .mobile-card-description {
            font-size: 10px;
            line-height: 1.7;
            text-align: justify;
            text-justify: inter-word;
          }

          .mobile-card-label {
            font-size: 8px;
          }

          .mobile-card-badge {
            font-size: 9px;
          }

          .mobile-card-actions {
            grid-template-columns: 1fr 1fr;
          }

          .mobile-action-button {
            min-height: 40px;
            font-size: 10px;
          }

          .table-card-footer {
            padding: 11px 14px;
          }

          .scroll-hint {
            display: none;
          }
        }

        /* =========================================================
           EXTRA SMALL
        ========================================================= */

        @media (max-width: 399.98px) {
          .topbar-title {
            max-width: 130px;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
          }

          .page-title {
            font-size: 21px;
          }

          .page-title-icon {
            width: 40px;
            height: 40px;
            min-width: 40px;
          }

          .admin-content {
            padding-left: 10px;
            padding-right: 10px;
          }

          .mobile-hero-list {
            padding: 9px;
          }

          .mobile-hero-card {
            padding: 12px;
          }

          .mobile-card-top {
            gap: 6px;
          }

          .status-badge {
            padding: 6px 8px;
            font-size: 9px;
          }

          .mobile-card-actions {
            gap: 6px;
          }

          .mobile-action-button {
            min-height: 38px;
            padding-left: 7px;
            padding-right: 7px;
          }
        }

        /* =========================================================
           VERY SMALL SCREEN
        ========================================================= */

        @media (max-width: 340px) {
          .admin-content {
            padding-left: 8px;
            padding-right: 8px;
          }

          .topbar-title {
            max-width: 105px;
          }

          .page-title {
            font-size: 19px;
          }

          .page-description {
            font-size: 9px;
            text-align: justify;
            text-justify: inter-word;
          }

          .mobile-hero-list {
            padding: 7px;
          }

          .mobile-hero-card {
            padding: 11px;
          }

          .mobile-card-title {
            font-size: 12px;
            text-align: justify;
            text-justify: inter-word;
          }

          .mobile-card-actions {
            grid-template-columns: 1fr;
          }
        }

        /* =========================================================
           REDUCED MOTION
        ========================================================= */

        @media (prefers-reduced-motion: reduce) {
          .hero-admin-page *,
          .hero-admin-page *::before,
          .hero-admin-page *::after {
            animation-duration: 0.01ms !important;
            animation-iteration-count: 1 !important;
            transition-duration: 0.01ms !important;
          }
        }
      `}</style>

      <div className="hero-admin-page">
        <div className="admin-layout">

          {/* MOBILE OVERLAY */}

          {sidebarOpen && (
            <div
              className="sidebar-overlay"
              onClick={closeSidebar}
              aria-hidden="true"
            />
          )}

          {/* SIDEBAR */}

          <aside
            className={`admin-sidebar ${
              sidebarOpen ? "open" : ""
            }`}
          >
            <div className="sidebar-inner">

              <div className="sidebar-brand">

                <div className="brand-icon">
                  <i className="bi bi-grid-1x2-fill"></i>
                </div>

                <div className="brand-text">
                  <strong>GloVaTech</strong>
                  <span>Admin Panel</span>
                </div>

                <button
                  type="button"
                  className="sidebar-close d-lg-none"
                  onClick={closeSidebar}
                  aria-label="Close sidebar"
                >
                  <i className="bi bi-x-lg"></i>
                </button>

              </div>

              {/* MAIN MENU */}

<div className="sidebar-section-label">
  MAIN MENU
</div>

<nav className="sidebar-nav">

  {/* DASHBOARD */}

  <Link
    href="/secure-panel"
    className="sidebar-link"
    onClick={closeSidebar}
  >
    <span className="sidebar-link-icon">
      <i className="bi bi-speedometer2"></i>
    </span>

    <span>Dashboard</span>
  </Link>

</nav>

{/* CONTENT */}

<div className="sidebar-section-label mt-4">
  CONTENT
</div>

<nav className="sidebar-nav">

  {/* HERO */}

  <Link
    href="/secure-panel/hero"
    className="sidebar-link active"
    onClick={closeSidebar}
  >
    <span className="sidebar-link-icon">
      <i className="bi bi-stars"></i>
    </span>

    <span>Hero</span>
  </Link>

  {/* ABOUT */}

  <Link
    href="/secure-panel/about"
    className="sidebar-link"
    onClick={closeSidebar}
  >
    <span className="sidebar-link-icon">
      <i className="bi bi-person-vcard"></i>
    </span>

    <span>About</span>
  </Link>

  {/* ABOUT STATS */}

  <Link
    href="/secure-panel/about/stats"
    className="sidebar-link"
    onClick={closeSidebar}
  >
    <span className="sidebar-link-icon">
      <i className="bi bi-bar-chart-line"></i>
    </span>

    <span>About Stats</span>
  </Link>

  {/* EDUCATION */}

  <Link
    href="/secure-panel/education"
    className="sidebar-link"
    onClick={closeSidebar}
  >
    <span className="sidebar-link-icon">
      <i className="bi bi-mortarboard"></i>
    </span>

    <span>Education</span>
  </Link>

  {/* SKILLS */}

  <Link
    href="/secure-panel/skills"
    className="sidebar-link"
    onClick={closeSidebar}
  >
    <span className="sidebar-link-icon">
      <i className="bi bi-tools"></i>
    </span>

    <span>Skills</span>
  </Link>

  {/* EXPERIENCE */}

  <Link
    href="/secure-panel/experience"
    className="sidebar-link"
    onClick={closeSidebar}
  >
    <span className="sidebar-link-icon">
      <i className="bi bi-briefcase"></i>
    </span>

    <span>Experience</span>
  </Link>

  {/* PROJECTS */}

  <Link
    href="/secure-panel/projects"
    className="sidebar-link"
    onClick={closeSidebar}
  >
    <span className="sidebar-link-icon">
      <i className="bi bi-code-square"></i>
    </span>

    <span>Projects</span>
  </Link>

  {/* CERTIFICATION */}

  <Link
    href="/secure-panel/certifications"
    className="sidebar-link"
    onClick={closeSidebar}
  >
    <span className="sidebar-link-icon">
      <i className="bi bi-patch-check"></i>
    </span>

    <span>Certification</span>
  </Link>

  {/* ACHIEVEMENT */}

  <Link
    href="/secure-panel/achievements"
    className="sidebar-link"
    onClick={closeSidebar}
  >
    <span className="sidebar-link-icon">
      <i className="bi bi-trophy"></i>
    </span>

    <span>Achievement</span>
  </Link>

  {/* SERVICES */}

  <Link
    href="/secure-panel/services"
    className="sidebar-link"
    onClick={closeSidebar}
  >
    <span className="sidebar-link-icon">
      <i className="bi bi-gear-wide-connected"></i>
    </span>

    <span>Services</span>
  </Link>

  {/* GALLERY */}

  <Link
    href="/secure-panel/gallery"
    className="sidebar-link"
    onClick={closeSidebar}
  >
    <span className="sidebar-link-icon">
      <i className="bi bi-images"></i>
    </span>

    <span>Gallery</span>
  </Link>

  {/* CONTACT INFO */}

  <Link
    href="/secure-panel/contact-info"
    className="sidebar-link"
    onClick={closeSidebar}
  >
    <span className="sidebar-link-icon">
      <i className="bi bi-person-lines-fill"></i>
    </span>

    <span>Contact Info</span>
  </Link>

  {/* CONTACT SOCIAL MEDIA */}

  <Link
    href="/secure-panel/contact-info/list"
    className="sidebar-link"
    onClick={closeSidebar}
  >
    <span className="sidebar-link-icon">
      <i className="bi bi-share-fill"></i>
    </span>

    <span>Contact Social Media</span>
  </Link>

  {/* ARTICLES */}

  <Link
    href="/secure-panel/articles"
    className="sidebar-link"
    onClick={closeSidebar}
  >
    <span className="sidebar-link-icon">
      <i className="bi bi-journal-text"></i>
    </span>

    <span>Articles</span>
  </Link>

  {/* CONTACT MESSAGES */}

  <Link
    href="/secure-panel/contact-messages"
    className="sidebar-link"
    onClick={closeSidebar}
  >
    <span className="sidebar-link-icon">
      <i className="bi bi-chat-left-text"></i>
    </span>

    <span>Contact Messages</span>
  </Link>

  {/* CONTACT USER */}

  <Link
    href="/secure-panel/contact-users"
    className="sidebar-link"
    onClick={closeSidebar}
  >
    <span className="sidebar-link-icon">
      <i className="bi bi-people-fill"></i>
    </span>

    <span>Contact User</span>
  </Link>

</nav>

              {/* SIDEBAR BOTTOM */}

              <div className="sidebar-bottom">

                <Link
                  href="/"
                  onClick={closeSidebar}
                >
                  <i className="bi bi-globe2"></i>

                  <span>View Website</span>

                  <i className="bi bi-arrow-up-right ms-auto"></i>
                </Link>

              </div>

            </div>
          </aside>

          {/* MAIN AREA */}

          <div className="admin-main">

            {/* TOPBAR */}

            <header className="admin-topbar">

              <div className="topbar-left">

                <button
                  type="button"
                  className="mobile-menu-button d-lg-none"
                  onClick={() => setSidebarOpen(true)}
                  aria-label="Open menu"
                >
                  <i className="bi bi-list"></i>
                </button>

                <div>

                  <div className="topbar-label">
                    ADMIN PANEL
                  </div>

                  <div className="topbar-title">
                    Hero Management
                  </div>

                </div>

              </div>

              <div className="topbar-right">

                <Link
                  href="/"
                  className="topbar-website"
                  title="View Website"
                  aria-label="View Website"
                >
                  <i className="bi bi-globe2"></i>

                  <span className="d-none d-sm-inline">
                    Website
                  </span>
                </Link>

                <Link
                  href="/secure-panel/login"
                  className="topbar-logout"
                  title="Logout"
                  aria-label="Logout"
                >
                  <i className="bi bi-box-arrow-right"></i>

                  <span className="d-none d-sm-inline">
                    Logout
                  </span>
                </Link>

              </div>

            </header>

            {/* CONTENT */}

            <main className="admin-content">

              {/* PAGE HEADER */}

              <section className="page-header">

                <div className="page-header-left">

                  <div className="page-eyebrow">
                    <span className="page-eyebrow-dot"></span>
                    CONTENT MANAGEMENT
                  </div>

                  <div className="page-title-row">

                    <div className="page-title-icon">
                      <i className="bi bi-stars"></i>
                    </div>

                    <div>

                      <h1 className="page-title">
                        Hero
                      </h1>

                      <p className="page-description">
                        Kelola konten Hero yang ditampilkan pada
                        halaman utama website GloVaTech. Atur badge,
                        judul, highlight, deskripsi, dan status
                        publikasi Hero secara terstruktur.
                      </p>

                    </div>

                  </div>

                </div>

                <Link
                  href="/secure-panel/hero/create"
                  className="add-button"
                >
                  <i className="bi bi-plus-lg"></i>

                  <span>
                    Tambah Hero
                  </span>
                </Link>

              </section>

              {/* SUMMARY */}

              {!loading && (
                <section className="summary-grid">

                  <div className="summary-card">

                    <div className="summary-icon">
                      <i className="bi bi-layout-text-window"></i>
                    </div>

                    <div>
                      <div className="summary-label">
                        Total Hero
                      </div>

                      <div className="summary-value">
                        {heroes.length}
                      </div>
                    </div>

                  </div>

                  <div className="summary-card">

                    <div className="summary-icon">
                      <i className="bi bi-check-circle"></i>
                    </div>

                    <div>
                      <div className="summary-label">
                        Active
                      </div>

                      <div className="summary-value">
                        {
                          heroes.filter(
                            (hero) => hero.active
                          ).length
                        }
                      </div>
                    </div>

                  </div>

                  <div className="summary-card">

                    <div className="summary-icon">
                      <i className="bi bi-pause-circle"></i>
                    </div>

                    <div>
                      <div className="summary-label">
                        Inactive
                      </div>

                      <div className="summary-value">
                        {
                          heroes.filter(
                            (hero) => !hero.active
                          ).length
                        }
                      </div>
                    </div>

                  </div>

                </section>
              )}

              {/* TABLE CARD */}

              <section className="table-card">

                {/* TABLE HEADER */}

                <div className="table-card-header">

                  <div className="table-heading-left">

                    <div className="table-heading-icon">
                      <i className="bi bi-list-ul"></i>
                    </div>

                    <div>

                      <h2 className="table-heading-title">
                        Hero Records
                      </h2>

                      <p className="table-heading-description">
                        Daftar konten Hero yang tersimpan.
                      </p>

                    </div>

                  </div>

                  {!loading && heroes.length > 0 && (
                    <div className="record-count">

                      <i className="bi bi-database"></i>

                      {heroes.length} Record

                    </div>
                  )}

                </div>

                {/* LOADING */}

                {loading ? (

                  <div className="loading-state">

                    <div className="loading-icon">

                      <span
                        className="spinner-border spinner-border-sm text-success"
                        role="status"
                        aria-hidden="true"
                      ></span>

                    </div>

                    <p>
                      Memuat data Hero...
                    </p>

                  </div>

                ) : heroes.length === 0 ? (

                  /* EMPTY */

                  <div className="empty-state">

                    <div className="empty-icon">
                      <i className="bi bi-stars"></i>
                    </div>

                    <h3 className="empty-title">
                      Belum Ada Data Hero
                    </h3>

                    <p className="empty-description">
                      Belum ada konten Hero yang tersimpan.
                      Tambahkan Hero pertama untuk mulai
                      mengelola konten halaman utama website.
                    </p>

                    <Link
                      href="/secure-panel/hero/create"
                      className="empty-button"
                    >
                      <i className="bi bi-plus-lg"></i>

                      Tambah Hero
                    </Link>

                  </div>

                ) : (

                  <>

                    {/* DESKTOP / TABLET TABLE */}

                    <div className="table-scroll">

                      <table className="hero-table">

                        <thead>

                          <tr>

                            <th style={{ width: "70px" }}>
                              ID
                            </th>

                            <th style={{ width: "150px" }}>
                              Badge
                            </th>

                            <th>
                              Hero Content
                            </th>

                            <th>
                              Description
                            </th>

                            <th style={{ width: "120px" }}>
                              Status
                            </th>

                            <th style={{ width: "180px" }}>
                              Aksi
                            </th>

                          </tr>

                        </thead>

                        <tbody>

                          {heroes.map((hero) => (

                            <tr key={hero.id}>

                              {/* ID */}

                              <td>

                                <span className="id-badge">
                                  #{hero.id}
                                </span>

                              </td>

                              {/* BADGE */}

                              <td>

                                {hero.badge ? (

                                  <span className="hero-badge">
                                    {hero.badge}
                                  </span>

                                ) : (

                                  <span className="text-secondary">
                                    —
                                  </span>

                                )}

                              </td>

                              {/* HERO CONTENT */}

                              <td className="hero-title-cell">

                                <div className="hero-title">
                                  {hero.title}
                                </div>

                                {hero.highlight && (

                                  <div className="hero-highlight">

                                    <i className="bi bi-stars me-1"></i>

                                    {hero.highlight}

                                  </div>

                                )}

                              </td>

                              {/* DESCRIPTION */}

                              <td>

                                {hero.description ? (

                                  <div className="hero-description">
                                    {hero.description}
                                  </div>

                                ) : (

                                  <span className="text-secondary">
                                    —
                                  </span>

                                )}

                              </td>

                              {/* STATUS */}

                              <td>

                                {hero.active ? (

                                  <span className="status-badge active">

                                    <span className="status-dot"></span>

                                    Active

                                  </span>

                                ) : (

                                  <span className="status-badge inactive">

                                    <span className="status-dot"></span>

                                    Inactive

                                  </span>

                                )}

                              </td>

                              {/* ACTION */}

                              <td className="action-cell">

                                <div className="action-buttons">

                                  <Link
                                    href={`/secure-panel/hero/${hero.id}/edit`}
                                    className="action-button edit-button"
                                    title="Edit Hero"
                                  >

                                    <i className="bi bi-pencil"></i>

                                    <span>
                                      Edit
                                    </span>

                                  </Link>

                                  <button
                                    type="button"
                                    className="action-button delete-button"
                                    title="Hapus Hero"
                                    onClick={() =>
                                      deleteHero(hero.id)
                                    }
                                  >

                                    <i className="bi bi-trash"></i>

                                    <span>
                                      Hapus
                                    </span>

                                  </button>

                                </div>

                              </td>

                            </tr>

                          ))}

                        </tbody>

                      </table>

                    </div>

                    {/* MOBILE CARD VIEW */}

                    <div className="mobile-hero-list">

                      {heroes.map((hero) => (

                        <article
                          key={`mobile-${hero.id}`}
                          className="mobile-hero-card"
                        >

                          {/* TOP */}

                          <div className="mobile-card-top">

                            <div className="mobile-card-id">

                              <span className="mobile-card-id-label">
                                ID
                              </span>

                              <span className="mobile-card-id-value">
                                #{hero.id}
                              </span>

                            </div>

                            <div className="mobile-card-status">

                              {hero.active ? (

                                <span className="status-badge active">

                                  <span className="status-dot"></span>

                                  Active

                                </span>

                              ) : (

                                <span className="status-badge inactive">

                                  <span className="status-dot"></span>

                                  Inactive

                                </span>

                              )}

                            </div>

                          </div>

                          {/* BADGE */}

                          <div className="mobile-card-section">

                            <span className="mobile-card-label">
                              Badge
                            </span>

                            {hero.badge ? (

                              <span className="mobile-card-badge">
                                {hero.badge}
                              </span>

                            ) : (

                              <span className="mobile-card-description empty">
                                —
                              </span>

                            )}

                          </div>

                          {/* HERO CONTENT */}

                          <div className="mobile-card-section">

                            <span className="mobile-card-label">
                              Hero Content
                            </span>

                            <div className="mobile-card-title">
                              {hero.title}
                            </div>

                            {hero.highlight && (

                              <div className="mobile-card-highlight">

                                <i className="bi bi-stars"></i>

                                {hero.highlight}

                              </div>

                            )}

                          </div>

                          {/* DESCRIPTION */}

                          <div className="mobile-card-section">

                            <span className="mobile-card-label">
                              Description
                            </span>

                            {hero.description ? (

                              <div className="mobile-card-description">
                                {hero.description}
                              </div>

                            ) : (

                              <div className="mobile-card-description empty">
                                —
                              </div>

                            )}

                          </div>

                          {/* ACTION */}

                          <div className="mobile-card-actions">

                            <Link
                              href={`/secure-panel/hero/${hero.id}/edit`}
                              className="mobile-action-button mobile-edit-button"
                              title="Edit Hero"
                            >

                              <i className="bi bi-pencil"></i>

                              <span>
                                Edit Hero
                              </span>

                            </Link>

                            <button
                              type="button"
                              className="mobile-action-button mobile-delete-button"
                              title="Hapus Hero"
                              onClick={() =>
                                deleteHero(hero.id)
                              }
                            >

                              <i className="bi bi-trash"></i>

                              <span>
                                Hapus Hero
                              </span>

                            </button>

                          </div>

                        </article>

                      ))}

                    </div>

                  </>

                )}

                {/* TABLE FOOTER */}

                {!loading && heroes.length > 0 && (

                  <div className="table-card-footer">

                    <div className="table-footer-info">

                      <i className="bi bi-shield-check"></i>

                      <span>
                        Hero Management System
                      </span>

                    </div>

                    <div className="scroll-hint">

                      <i className="bi bi-arrow-left-right"></i>

                      <span>
                        Geser tabel untuk melihat semua kolom
                      </span>

                    </div>

                    <span>
                      {heroes.length} data tersimpan
                    </span>

                  </div>

                )}

              </section>

              {/* PAGE FOOTER */}

              <footer className="admin-page-footer">

                <div>

                  <i className="bi bi-shield-check"></i>

                  <span>
                    Admin Content Management System
                  </span>

                </div>

                <Link href="/secure-panel">

                  <i className="bi bi-arrow-left me-1"></i>

                  Dashboard

                </Link>

              </footer>

            </main>

          </div>

        </div>
      </div>
    </>
  );
}