:root {
  --unimel-red: #8B0000;
  --unimel-gold: #C4A535;
  --unimel-dark: #1a1a2e;
  --sidebar-width: 260px;
}

/* === GENERAL === */
body { font-family: 'Segoe UI', sans-serif; background: #f0f2f5; }

/* === SIDEBAR === */
.sidebar {
  width: var(--sidebar-width);
  min-height: 100vh;
  background: linear-gradient(180deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  position: fixed;
  top: 0; left: 0;
  z-index: 1000;
  transition: all 0.3s;
  box-shadow: 4px 0 15px rgba(0,0,0,0.3);
}
.sidebar.collapsed { width: 70px; }
/* Kontainer utama */
.sidebar-brand {
  display: flex;
  flex-direction: column; /* Susun ke bawah */
  align-items: center;    /* Pusatkan semua elemen ke tengah */
  padding: 15px;          /* Ruang dalam */
  text-align: center;     /* Pastikan teks dalam h4 dan span ke tengah */
}

/* Kotak Logo */
.sidebar-brand .brand-icon {
  width: 100%;            /* Full width dalam sidebar */
  background: #fff;       /* Latar belakang putih */
  border-radius: 8px;
  padding: 10px;          /* Ruang antara logo dan tepi kotak putih */
  margin-bottom: 12px;    /* Jarak antara kotak logo dan teks di bawah */
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Imej Logo */
.sidebar-brand .brand-icon img {
  width: 100%;            /* Guna lebar penuh kotak putih */
  max-height: 60px;       /* Laraskan ketinggian mengikut kesesuaian */
  object-fit: contain;    /* Pastikan logo tidak herot (distorted) */
}

/* Bahagian Teks */
.sidebar-brand .brand-text {
  width: 100%;
}

.sidebar-brand h4 {
  color: #fff;
  font-size: 14px;
  margin: 0;
  text-transform: uppercase;
  font-weight: bold;
}

.sidebar-nav { padding: 15px 0; }
.nav-section-title { padding: 10px 20px 5px; font-size: 10px; text-transform: uppercase; color: rgba(255,255,255,0.4); letter-spacing: 1.5px; }
.sidebar-nav .nav-link {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 20px; color: rgba(255,255,255,0.7);
  text-decoration: none; transition: all 0.2s;
  border-left: 3px solid transparent;
  font-size: 14px;
}
.sidebar-nav .nav-link:hover, .sidebar-nav .nav-link.active {
  color: #fff; background: rgba(255,255,255,0.1);
  border-left-color: var(--unimel-gold);
}
.sidebar-nav .nav-link i { font-size: 16px; flex-shrink: 0; }

/* === MAIN CONTENT === */
.main-content {
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  transition: all 0.3s;
}
.main-content.expanded { margin-left: 70px; }

/* === TOPBAR === */
.topbar {
  background: #fff;
  padding: 12px 25px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 999;
}
.topbar .page-title { font-size: 18px; font-weight: 600; color: #333; margin: 0; }

/* === STAT CARDS === */
.stat-card {
  background: #fff;
  border-radius: 12px;
  padding: 22px;
  box-shadow: 0 2px 15px rgba(0,0,0,0.06);
  border: none;
  transition: transform 0.2s, box-shadow 0.2s;
}
.stat-card:hover { transform: translateY(-3px); box-shadow: 0 8px 25px rgba(0,0,0,0.12); }
.stat-card .icon-box {
  width: 52px; height: 52px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; color: #fff;
}
.stat-card .stat-number { font-size: 28px; font-weight: 700; color: #1a1a2e; }
.stat-card .stat-label { font-size: 13px; color: #888; }

/* === TABLES === */
.table-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 15px rgba(0,0,0,0.06);
  overflow: hidden;
}
.table-card .card-header {
  padding: 18px 22px;
  background: #fff;
  border-bottom: 1px solid #f0f0f0;
  display: flex; align-items: center; justify-content: space-between;
}
.table thead th {
  background: #f8f9fa;
  border-bottom: 2px solid #e9ecef;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #666;
  font-weight: 600;
  padding: 12px 15px;
}
.table tbody td { padding: 13px 15px; font-size: 14px; vertical-align: middle; }
.table tbody tr:hover { background: #f8f9ff; }

/* === BADGES === */
.badge-verified { background: #d1fae5; color: #065f46; }
.badge-pending  { background: #fef3c7; color: #92400e; }
.badge-rejected { background: #fee2e2; color: #991b1b; }

/* === FORMS === */
.form-card {
  background: #fff;
  border-radius: 12px;
  padding: 28px;
  box-shadow: 0 2px 15px rgba(0,0,0,0.06);
}
.form-label { font-size: 13px; font-weight: 600; color: #555; margin-bottom: 5px; }
.form-control, .form-select {
  border-radius: 8px;
  border: 1.5px solid #e0e0e0;
  padding: 10px 14px;
  font-size: 14px;
  transition: border-color 0.2s;
}
.form-control:focus, .form-select:focus {
  border-color: var(--unimel-red);
  box-shadow: 0 0 0 3px rgba(139,0,0,0.1);
}

/* === BUTTONS === */
.btn-unimel {
  background: var(--unimel-red);
  color: #fff; border: none;
  border-radius: 8px;
  padding: 10px 22px;
  font-weight: 600;
  transition: all 0.2s;
}
.btn-unimel:hover { background: #6b0000; color: #fff; transform: translateY(-1px); }
.btn-gold { background: var(--unimel-gold); color: #fff; border: none; border-radius: 8px; padding: 10px 22px; }

/* === LOGIN PAGE === */
.login-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #1a1a2e 0%, #8B0000 100%); }
.login-card { background: #fff; border-radius: 20px; padding: 40px; width: 100%; max-width: 420px; box-shadow: 0 20px 60px rgba(0,0,0,0.3); }
.login-logo { text-align: center; margin-bottom: 25px; }
.login-logo .logo-circle { width: 70px; height: 70px; background: var(--unimel-red); border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; }

/* === REGISTER PAGE === */
.register-page { background: linear-gradient(135deg, #1a1a2e 0%, #8B0000 100%); min-height: 100vh; padding: 30px 15px; }
.register-card { background: #fff; border-radius: 20px; max-width: 700px; margin: 0 auto; overflow: hidden; box-shadow: 0 20px 60px rgba(0,0,0,0.3); }
.register-header { background: linear-gradient(135deg, #8B0000, #C4A535); padding: 30px; color: #fff; text-align: center; }

/* === QR CODE === */
.qr-card { background: #fff; border-radius: 12px; padding: 20px; text-align: center; box-shadow: 0 2px 15px rgba(0,0,0,0.06); }

/* === MOBILE === */
.sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 999; }
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.mobile-open { transform: translateX(0); }
  .sidebar-overlay.show { display: block; }
  .main-content { margin-left: 0 !important; }
  .topbar { padding: 10px 15px; }
  .stat-card .stat-number { font-size: 22px; }
}
