/* ===== TMANETID: HEADER KANAN FINAL SEJAJAR & PROPOSIONAL ===== */

.topbar {
  position: relative;
  overflow: hidden;
  z-index: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding: 26px 30px 86px;
  margin-bottom: -58px;
  border-radius: 26px;
  color: #fff;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 60%, #1e40af 100%);
  box-shadow: 0 18px 40px rgba(29, 78, 216, .28);
}

html[data-theme="dark"] .topbar {
  background: linear-gradient(135deg, #1d4ed8 0%, #173b8f 55%, #0f2457 100%);
  box-shadow: 0 18px 40px rgba(2, 8, 23, .55);
}

.topbar:after {
  content: "";
  position: absolute;
  width: 280px;
  height: 280px;
  right: -80px;
  top: -140px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 50%;
  pointer-events: none;
  box-shadow: 0 0 0 32px rgba(255, 255, 255, .04), 0 0 0 64px rgba(255, 255, 255, .03);
}

.topbar > * {
  position: relative;
  z-index: 1;
}

.topbar ~ .page {
  position: relative;
  z-index: 1;
}

/* Teks header */
.topbar h1, html[data-theme] .topbar h1 {
  color: #fff !important;
  margin: 0 0 4px;
  letter-spacing: -.5px;
}

.topbar h1:after, .topbar h1:before {
  background: rgba(255, 255, 255, .55) !important;
}

.topbar .subtitle, html[data-theme] .topbar .subtitle {
  color: rgba(255, 255, 255, .82) !important;
  margin: 0;
}

.topbar .admin-label b, html[data-theme] .topbar .admin-label b {
  color: #fff !important;
}

/* ===== KELOMPOK KANAN: PRESISI, SEJAJAR, & PROPOSIONAL ===== */
.topbar .admin {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  flex-wrap: wrap !important;
}

/* Ukuran Avatar Bulat */
.topbar .avatar {
  background: rgba(255, 255, 255, .2) !important;
  color: #fff !important;
  border: 2px solid rgba(255, 255, 255, .55);
  box-shadow: none !important;
  width: 36px !important;
  height: 36px !important;
  min-width: 36px !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  margin: 0 !important;
}

/* Tombol Lonceng & Tombol Tema (Proporsional 36x36px, Bersih Tanpa Tumpang Tindih) */
.topbar .admin button:not(.logout),
.topbar .admin [class*="bell"],
.topbar .admin [class*="notif"] {
  position: relative !important;
  background: rgba(255, 255, 255, .16) !important;
  color: #fff !important;
  border: 1px solid rgba(255, 255, 255, .28) !important;
  border-radius: 10px !important;
  width: 36px !important;
  height: 36px !important;
  min-width: 36px !important;
  min-height: 36px !important;
  padding: 0 !important;
  margin: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 15px !important;
  backdrop-filter: blur(6px);
  cursor: pointer;
  box-shadow: none !important;
}

.topbar .admin button:not(.logout):hover,
.topbar .admin [class*="bell"]:hover {
  background: rgba(255, 255, 255, .28) !important;
}

.topbar .admin button:not(.logout) i,
.topbar .admin [class*="bell"] i {
  color: #fff !important;
  font-size: 15px !important;
}

/* Posisi Badge Lonceng yang Rapi di Pojok Kanan Atas */
.topbar .admin #gpsBellBadge,
.topbar .admin [id*="Badge"] {
  position: absolute !important;
  top: -4px !important;
  right: -4px !important;
  min-width: 16px !important;
  height: 16px !important;
  line-height: 16px !important;
  font-size: 9.5px !important;
  font-weight: 700 !important;
  padding: 0 3px !important;
  border-radius: 20px !important;
  background: #dc2626 !important;
  color: #fff !important;
  border: 1.5px solid #1d4ed8 !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.25);
  text-align: center;
  display: inline-block !important;
}

/* Label Teks Administrator & Admin */
.topbar .admin-label {
  line-height: 1.2 !important;
  margin: 0 2px !important;
}

/* Tombol Keluar (Proporsional & Sejajar Tinggi 36px) */
.topbar .logout {
  background: #fff !important;
  color: #dc2626 !important;
  font-weight: 800 !important;
  font-size: 12px !important;
  border: 0 !important;
  border-radius: 10px !important;
  padding: 0 16px !important;
  height: 36px !important;
  min-height: 36px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .15) !important;
  cursor: pointer;
  margin: 0 !important;
}

.topbar .logout:hover {
  filter: none;
  background: #fee2e2 !important;
}

/* KARTU STATISTIK TETAP SEPERTI SEMULA */
.stats {
  padding: 0 22px;
  position: relative;
  z-index: 2;
}

.stats .card, .topbar ~ .page > .card:first-child {
  box-shadow: 0 14px 34px rgba(15, 23, 42, .14);
  transition: transform .15s ease, box-shadow .15s ease;
}

.stats .card:hover {
  transform: translateY(-3px);
}

html[data-theme="dark"] .stats .card,
html[data-theme="dark"] .topbar ~ .page > .card:first-child {
  box-shadow: 0 14px 34px rgba(2, 8, 23, .5);
}

.topbar ~ .page > .card:first-child {
  margin-left: 22px;
  margin-right: 22px;
}

@media(max-width: 800px) {
  .topbar {
    padding: 18px 16px 76px;
    border-radius: 20px;
    margin-bottom: -52px;
  }
  .stats {
    padding: 0 8px;
  }
  .topbar ~ .page > .card:first-child {
    margin-left: 8px;
    margin-right: 8px;
  }
  .topbar .admin {
    gap: 8px;
  }
}
