/* UI78: restrained Super Admin header and legible mobile counters. */
body.admin-panel .admin-dashboard > .admin-topbar {
  min-height: 66px;
  padding: 10px 18px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 6px 18px rgba(15, 23, 42, .06);
}

body.admin-panel .admin-topbar .ds-top-l {
  gap: 11px;
}

body.admin-panel .admin-topbar .admin-brand {
  min-width: 126px;
}

body.admin-panel .admin-topbar .admin-top-avatar {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, #1a6ff5, #12b8c8);
  border: 0;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 850;
  box-shadow: none;
}

body.admin-panel .admin-topbar .admin-top-copy {
  min-width: 0;
}

body.admin-panel .admin-topbar .ds-top-name {
  max-width: 260px;
  font-size: 14px;
  font-weight: 800;
}

body.admin-panel .admin-topbar .ds-top-sub {
  margin-top: 2px;
  font-size: 11px;
}

body.admin-panel .admin-topbar .ds-top-r {
  gap: 12px;
}

body.admin-panel .admin-role-label,
body.admin-panel .admin-logout-action {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 4px;
  color: var(--ink3);
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  font-size: 12px;
  font-weight: 750;
  text-decoration: none;
  white-space: nowrap;
}

body.admin-panel .admin-role-label i {
  color: var(--blue);
}

body.admin-panel .admin-logout-action {
  color: var(--red);
  transition: color .16s ease, opacity .16s ease;
}

body.admin-panel .admin-logout-action:hover {
  color: #dc2626;
  opacity: .78;
}

body.admin-panel .admin-top-divider {
  width: 1px;
  height: 24px;
  background: var(--border);
}

@media (max-width: 760px) {
  html.vetta-native-ios:not(.vetta-native-safearea-managed) body.admin-panel .admin-dashboard {
    padding-top: env(safe-area-inset-top, 0px) !important;
  }

  body.admin-panel .admin-dashboard > .admin-topbar {
    min-height: 58px;
    padding: 7px 10px;
    border-right: 0;
    border-left: 0;
    border-radius: 0;
    box-shadow: 0 4px 14px rgba(15, 23, 42, .06);
  }

  body.admin-panel .admin-topbar .admin-brand {
    min-width: 0;
  }

  body.admin-panel .admin-topbar .admin-top-avatar {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
  }

  body.admin-panel .admin-topbar .admin-top-copy {
    display: block !important;
  }

  body.admin-panel .admin-topbar .ds-top-name {
    max-width: 112px;
    font-size: 12px;
  }

  body.admin-panel .admin-topbar .ds-top-sub,
  body.admin-panel .admin-role-label,
  body.admin-panel .admin-top-divider {
    display: none !important;
  }

  body.admin-panel .admin-logout-action {
    width: 36px;
    height: 36px;
    min-height: 36px;
    padding: 0;
    font-size: 0;
  }

  body.admin-panel .admin-logout-action i {
    font-size: 16px;
  }

  /* Counter rings stay visible over both the icon and the translucent dock. */
  html body.admin-panel.has-mobile-nav > #mobile-nav .mob-badge {
    top: 0 !important;
    right: -4px !important;
    min-width: 17px !important;
    height: 17px !important;
    padding: 0 4px !important;
    color: #fff !important;
    background: #e5252a !important;
    border: 2px solid #fff !important;
    border-radius: 999px !important;
    box-shadow: 0 2px 7px rgba(229, 37, 42, .28) !important;
    line-height: 13px !important;
  }

  html body.admin-panel.has-mobile-nav > #mobile-nav .mob-nav-btn.active::after {
    width: 24px !important;
    height: 3px !important;
    background: var(--grad) !important;
    box-shadow: 0 2px 8px rgba(26, 111, 245, .32) !important;
  }

  html body.admin-panel.has-mobile-nav .notif-fab {
    border: 3px solid #fff !important;
    box-shadow: 0 9px 24px rgba(14, 116, 204, .24) !important;
  }
}

[data-theme="dark"] body.admin-panel .admin-dashboard > .admin-topbar {
  background: var(--card2);
  border-color: rgba(255, 255, 255, .1);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .2);
}

[data-theme="dark"] body.admin-panel .admin-top-divider {
  background: rgba(255, 255, 255, .12);
}

@media (max-width: 760px) {
  [data-theme="dark"] body.admin-panel.has-mobile-nav > #mobile-nav .mob-badge {
    border-color: #111827 !important;
  }

  [data-theme="dark"] body.admin-panel.has-mobile-nav .notif-fab {
    border-color: #111827 !important;
  }
}
